MCPcopy Create free account
hub / github.com/apache/tomcat / cloneWithoutCredentials

Method cloneWithoutCredentials

java/org/apache/tomcat/dbcp/dbcp2/Utils.java:115–123  ·  view source on GitHub ↗

Clones the given Properties without the standard "user" or "password" entries. @param properties may be null @return a clone of the input without the standard "user" or "password" entries. @since 2.8.0

(final Properties properties)

Source from the content-addressed store, hash-verified

113 * @since 2.8.0
114 */
115 public static Properties cloneWithoutCredentials(final Properties properties) {
116 if (properties != null) {
117 final Properties temp = (Properties) properties.clone();
118 temp.remove(Constants.KEY_USER);
119 temp.remove(Constants.KEY_PASSWORD);
120 return temp;
121 }
122 return properties;
123 }
124
125 /**
126 * Closes the given {@link AutoCloseable} and if an exception is caught, then calls {@code exceptionHandler}.

Callers 2

toStringMethod · 0.95
toStringMethod · 0.95

Calls 2

cloneMethod · 0.65
removeMethod · 0.65

Tested by

no test coverage detected