You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by an...@apache.org on 2014/09/15 20:04:20 UTC
svn commit: r1625100 -
/tomee/tomee/branches/tomee-1.7.x/container/openejb-core/src/main/java/org/apache/openejb/util/PropertyPlaceHolderHelper.java
Author: andygumbrecht
Date: Mon Sep 15 18:04:20 2014
New Revision: 1625100
URL: http://svn.apache.org/r1625100
Log:
PMD
Modified:
tomee/tomee/branches/tomee-1.7.x/container/openejb-core/src/main/java/org/apache/openejb/util/PropertyPlaceHolderHelper.java
Modified: tomee/tomee/branches/tomee-1.7.x/container/openejb-core/src/main/java/org/apache/openejb/util/PropertyPlaceHolderHelper.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/container/openejb-core/src/main/java/org/apache/openejb/util/PropertyPlaceHolderHelper.java?rev=1625100&r1=1625099&r2=1625100&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/container/openejb-core/src/main/java/org/apache/openejb/util/PropertyPlaceHolderHelper.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/container/openejb-core/src/main/java/org/apache/openejb/util/PropertyPlaceHolderHelper.java Mon Sep 15 18:04:20 2014
@@ -34,6 +34,7 @@ public final class PropertyPlaceHolderHe
private static final PropertiesLookup RESOLVER = new PropertiesLookup();
public static final StrSubstitutor SUBSTITUTOR = new StrSubstitutor(RESOLVER);
+
static {
SUBSTITUTOR.setEnableSubstitutionInVariables(true);
SUBSTITUTOR.setValueDelimiter(System.getProperty("openejb.placehodler.delimiter", ":-")); // default one of [lang3]
@@ -65,10 +66,10 @@ public final class PropertyPlaceHolderHe
return decryptIfNeeded(value.replace(PREFIX, "").replace(SUFFIX, ""));
}
- private static String decryptIfNeeded(String replace) {
+ private static String decryptIfNeeded(final String replace) {
if (replace.startsWith(CIPHER_PREFIX)) {
final String algo = replace.substring(CIPHER_PREFIX.length(), replace.indexOf(':', CIPHER_PREFIX.length() + 1));
- PasswordCipher cipher = null;
+ PasswordCipher cipher;
try {
cipher = PasswordCipherFactory.getPasswordCipher(algo);
} catch (final PasswordCipherException ex) {