Merge pull request #1764 from lihongxu/master

refactor the method of decrypt
This commit is contained in:
高铁
2017-06-10 13:03:33 +08:00
committed by GitHub
@@ -137,8 +137,6 @@ public class ConfigFilter extends FilterAdapter {
}
public boolean isDecrypt(Properties connectinProperties, Properties configFileProperties) {
boolean decrypt = false;
String decrypterId = connectinProperties.getProperty(CONFIG_DECRYPT);
if (decrypterId == null || decrypterId.length() == 0) {
if (configFileProperties != null) {
@@ -150,11 +148,7 @@ public class ConfigFilter extends FilterAdapter {
decrypterId = System.getProperty(SYS_PROP_CONFIG_DECRYPT);
}
if ("true".equals(decrypterId)) {
decrypt = true;
}
return decrypt;
return Boolean.valueOf(decrypterId);
}
Properties loadPropertyFromConfigFile(Properties connectinProperties) {