Browse Source

checkstyle updates

Jason Rivard 8 years ago
parent
commit
be0c86665c
25 changed files with 50 additions and 40 deletions
  1. 5 0
      checkstyle.xml
  2. 1 1
      pom.xml
  3. 1 1
      src/main/java/password/pwm/PwmApplication.java
  4. 4 4
      src/main/java/password/pwm/config/PwmSetting.java
  5. 1 1
      src/main/java/password/pwm/config/PwmSettingXml.java
  6. 1 1
      src/main/java/password/pwm/config/profile/NewUserProfile.java
  7. 1 1
      src/main/java/password/pwm/config/stored/ConfigurationReader.java
  8. 1 1
      src/main/java/password/pwm/config/stored/NGStorageEngineImpl.java
  9. 3 3
      src/main/java/password/pwm/config/stored/StoredConfigurationImpl.java
  10. 1 1
      src/main/java/password/pwm/config/value/VerificationMethodValue.java
  11. 4 2
      src/main/java/password/pwm/http/PwmSession.java
  12. 3 1
      src/main/java/password/pwm/http/client/PwmHttpClientResponse.java
  13. 2 2
      src/main/java/password/pwm/http/filter/SessionFilter.java
  14. 8 8
      src/main/java/password/pwm/http/servlet/CommandServlet.java
  15. 1 1
      src/main/java/password/pwm/http/servlet/configeditor/ConfigEditorServlet.java
  16. 1 1
      src/main/java/password/pwm/http/tag/url/PwmUrlTag.java
  17. 1 1
      src/main/java/password/pwm/i18n/PwmLocaleBundle.java
  18. 1 1
      src/main/java/password/pwm/svc/report/ReportSettings.java
  19. 1 1
      src/main/java/password/pwm/svc/stats/EventRateMeter.java
  20. 2 1
      src/main/java/password/pwm/svc/stats/StatisticsBundle.java
  21. 3 3
      src/main/java/password/pwm/util/cli/MainOptions.java
  22. 1 1
      src/main/java/password/pwm/util/db/DatabaseAccessorImpl.java
  23. 1 1
      src/main/java/password/pwm/util/macro/StandardMacros.java
  24. 1 1
      src/main/java/password/pwm/util/queue/SmsQueueManager.java
  25. 1 1
      src/main/java/password/pwm/util/secure/ChecksumInputStream.java

+ 5 - 0
checkstyle.xml

@@ -298,6 +298,11 @@
         <module name="ParameterAssignment"/>
         <module name="ParameterAssignment"/>
         <module name="SimplifyBooleanReturn"/>
         <module name="SimplifyBooleanReturn"/>
         <module name="StringLiteralEquality"/>
         <module name="StringLiteralEquality"/>
+        <module name="CovariantEquals"/>
+        <module name="DefaultComesLast"/>
+        <module name="EmptyStatement"/>
+        <module name="EqualsHashCode"/>
+        <module name="EqualsAvoidNull"/>
 
 
         <module name="MutableException"/>
         <module name="MutableException"/>
         <module name="OuterTypeFilename"/>
         <module name="OuterTypeFilename"/>

+ 1 - 1
pom.xml

@@ -418,7 +418,7 @@
             <plugin> <!-- checks owsp vulnerability database during verify phase -->
             <plugin> <!-- checks owsp vulnerability database during verify phase -->
                 <groupId>org.owasp</groupId>
                 <groupId>org.owasp</groupId>
                 <artifactId>dependency-check-maven</artifactId>
                 <artifactId>dependency-check-maven</artifactId>
-                <version>1.4.3</version>
+                <version>1.4.5</version>
                 <executions>
                 <executions>
                     <execution>
                     <execution>
                         <goals>
                         <goals>

+ 1 - 1
src/main/java/password/pwm/PwmApplication.java

@@ -148,7 +148,7 @@ public class PwmApplication {
 
 
     private final Instant startupTime = Instant.now();
     private final Instant startupTime = Instant.now();
     private Instant installTime = Instant.now();
     private Instant installTime = Instant.now();
-    private ErrorInformation lastLocalDBFailure = null;
+    private ErrorInformation lastLocalDBFailure;
 
 
     private final PwmEnvironment pwmEnvironment;
     private final PwmEnvironment pwmEnvironment;
 
 

+ 4 - 4
src/main/java/password/pwm/config/PwmSetting.java

@@ -1315,13 +1315,13 @@ public enum PwmSetting {
     }
     }
 
 
     public String getLabel(final Locale locale) {
     public String getLabel(final Locale locale) {
-        final String key = "Setting_Label_" + this.getKey();
-        return LocaleHelper.getLocalizedMessage(locale, key, null, password.pwm.i18n.PwmSetting.class);
+        final String propertyKey = "Setting_Label_" + this.getKey();
+        return LocaleHelper.getLocalizedMessage(locale, propertyKey, null, password.pwm.i18n.PwmSetting.class);
     }
     }
 
 
     public String getDescription(final Locale locale) {
     public String getDescription(final Locale locale) {
-        final String key = "Setting_Description_" + this.getKey();
-        final String storedText = LocaleHelper.getLocalizedMessage(locale, key, null, password.pwm.i18n.PwmSetting.class);
+        final String propertyKey = "Setting_Description_" + this.getKey();
+        final String storedText = LocaleHelper.getLocalizedMessage(locale, propertyKey, null, password.pwm.i18n.PwmSetting.class);
         final MacroMachine macroMachine = MacroMachine.forStatic();
         final MacroMachine macroMachine = MacroMachine.forStatic();
         return macroMachine.expandMacros(storedText);
         return macroMachine.expandMacros(storedText);
     }
     }

+ 1 - 1
src/main/java/password/pwm/config/PwmSettingXml.java

@@ -54,7 +54,7 @@ public class PwmSettingXml {
     public static final String XML_ATTRIBUTE_TEMPLATE = "template";
     public static final String XML_ATTRIBUTE_TEMPLATE = "template";
 
 
 
 
-    private static Document xmlDocCache = null;
+    private static Document xmlDocCache;
 
 
     private static Document readXml() {
     private static Document readXml() {
         final Document docRefCopy = xmlDocCache;
         final Document docRefCopy = xmlDocCache;

+ 1 - 1
src/main/java/password/pwm/config/profile/NewUserProfile.java

@@ -96,7 +96,7 @@ public class NewUserProfile extends AbstractProfile {
         } else {
         } else {
 
 
             final String lookupDN;
             final String lookupDN;
-            if (configuredNewUserPasswordDN.equalsIgnoreCase("TESTUSER") ) {
+            if ("TESTUSER".equalsIgnoreCase(configuredNewUserPasswordDN)) {
                 lookupDN = defaultLdapProfile.readSettingAsString(PwmSetting.LDAP_TEST_USER_DN);
                 lookupDN = defaultLdapProfile.readSettingAsString(PwmSetting.LDAP_TEST_USER_DN);
                 if (lookupDN == null || lookupDN.isEmpty()) {
                 if (lookupDN == null || lookupDN.isEmpty()) {
                     final String errorMsg ="setting " 
                     final String errorMsg ="setting " 

+ 1 - 1
src/main/java/password/pwm/config/stored/ConfigurationReader.java

@@ -149,7 +149,7 @@ public class ConfigurationReader {
         }
         }
 
 
         final String configIsEditable = storedConfiguration.readConfigProperty(ConfigurationProperty.CONFIG_IS_EDITABLE);
         final String configIsEditable = storedConfiguration.readConfigProperty(ConfigurationProperty.CONFIG_IS_EDITABLE);
-        if (PwmConstants.TRIAL_MODE || (configIsEditable != null && configIsEditable.equalsIgnoreCase("true"))) {
+        if (PwmConstants.TRIAL_MODE || (configIsEditable != null && "true".equalsIgnoreCase(configIsEditable))) {
             this.configMode = PwmApplicationMode.CONFIGURATION;
             this.configMode = PwmApplicationMode.CONFIGURATION;
         } else {
         } else {
             this.configMode = PwmApplicationMode.RUNNING;
             this.configMode = PwmApplicationMode.RUNNING;

+ 1 - 1
src/main/java/password/pwm/config/stored/NGStorageEngineImpl.java

@@ -36,7 +36,7 @@ class NGStorageEngineImpl implements StorageEngine {
     private final ConfigChangeLog changeLog;
     private final ConfigChangeLog changeLog;
 
 
     private final ReentrantReadWriteLock bigLock = new ReentrantReadWriteLock();
     private final ReentrantReadWriteLock bigLock = new ReentrantReadWriteLock();
-    private boolean writeLocked = false;
+    private boolean writeLocked;
 
 
     NGStorageEngineImpl(
     NGStorageEngineImpl(
             final Map<StoredConfigReference, StoredValue> values,
             final Map<StoredConfigReference, StoredValue> values,

+ 3 - 3
src/main/java/password/pwm/config/stored/StoredConfigurationImpl.java

@@ -103,8 +103,8 @@ public class StoredConfigurationImpl implements Serializable, StoredConfiguratio
     private Document document = new Document(new Element(XML_ELEMENT_ROOT));
     private Document document = new Document(new Element(XML_ELEMENT_ROOT));
     private ChangeLog changeLog = new ChangeLog();
     private ChangeLog changeLog = new ChangeLog();
 
 
-    private boolean locked = false;
-    private boolean setting_writeLabels = true;
+    private boolean locked;
+    private final boolean setting_writeLabels = true;
     private final ReentrantReadWriteLock domModifyLock = new ReentrantReadWriteLock();
     private final ReentrantReadWriteLock domModifyLock = new ReentrantReadWriteLock();
 
 
 // -------------------------- STATIC METHODS --------------------------
 // -------------------------- STATIC METHODS --------------------------
@@ -1247,7 +1247,7 @@ public class StoredConfigurationImpl implements Serializable, StoredConfiguratio
         return changeLog.changeLogAsDebugString(locale, asHtml);
         return changeLog.changeLogAsDebugString(locale, asHtml);
     }
     }
 
 
-    private PwmSecurityKey cachedKey = null;
+    private PwmSecurityKey cachedKey;
 
 
     public PwmSecurityKey getKey() throws PwmUnrecoverableException {
     public PwmSecurityKey getKey() throws PwmUnrecoverableException {
         if (cachedKey == null) {
         if (cachedKey == null) {

+ 1 - 1
src/main/java/password/pwm/config/value/VerificationMethodValue.java

@@ -56,7 +56,7 @@ public class VerificationMethodValue extends AbstractValue implements StoredValu
 
 
     public static class VerificationMethodSettings implements Serializable {
     public static class VerificationMethodSettings implements Serializable {
         private Map<IdentityVerificationMethod,VerificationMethodSetting> methodSettings = new HashMap<>();
         private Map<IdentityVerificationMethod,VerificationMethodSetting> methodSettings = new HashMap<>();
-        private int minOptionalRequired = 0;
+        private int minOptionalRequired;
 
 
         public VerificationMethodSettings() {
         public VerificationMethodSettings() {
         }
         }

+ 4 - 2
src/main/java/password/pwm/http/PwmSession.java

@@ -247,9 +247,11 @@ public class PwmSession implements Serializable {
         final LocalSessionStateBean ssBean = this.getSessionStateBean();
         final LocalSessionStateBean ssBean = this.getSessionStateBean();
         final List<Locale> knownLocales = pwmApplication.getConfig().getKnownLocales();
         final List<Locale> knownLocales = pwmApplication.getConfig().getKnownLocales();
         final Locale requestedLocale = LocaleHelper.parseLocaleString(localeString);
         final Locale requestedLocale = LocaleHelper.parseLocaleString(localeString);
-        if (knownLocales.contains(requestedLocale) || localeString.equalsIgnoreCase("default")) {
+        if (knownLocales.contains(requestedLocale) || "default".equalsIgnoreCase(localeString)) {
             LOGGER.debug(this, "setting session locale to '" + localeString + "'");
             LOGGER.debug(this, "setting session locale to '" + localeString + "'");
-            ssBean.setLocale(localeString.equalsIgnoreCase("default") ? PwmConstants.DEFAULT_LOCALE : requestedLocale);
+            ssBean.setLocale("default".equalsIgnoreCase(localeString)
+                    ? PwmConstants.DEFAULT_LOCALE
+                    : requestedLocale);
             if (this.isAuthenticated()) {
             if (this.isAuthenticated()) {
                 try {
                 try {
                     final UserStatusReader userStatusReader = new UserStatusReader(pwmApplication, this.getLabel());
                     final UserStatusReader userStatusReader = new UserStatusReader(pwmApplication, this.getLabel());

+ 3 - 1
src/main/java/password/pwm/http/client/PwmHttpClientResponse.java

@@ -35,7 +35,9 @@ public class PwmHttpClientResponse implements Serializable {
     public PwmHttpClientResponse(final int statusCode, final String statusPhrase, final Map<String, String> headers, final String body) {
     public PwmHttpClientResponse(final int statusCode, final String statusPhrase, final Map<String, String> headers, final String body) {
         this.statusCode = statusCode;
         this.statusCode = statusCode;
         this.statusPhrase = statusPhrase;
         this.statusPhrase = statusPhrase;
-        this.headers = headers == null ? Collections.<String,String>emptyMap() : Collections.unmodifiableMap(headers);;
+        this.headers = headers == null
+                ? Collections.emptyMap()
+                : Collections.unmodifiableMap(headers);
         this.body = body;
         this.body = body;
     }
     }
 
 

+ 2 - 2
src/main/java/password/pwm/http/filter/SessionFilter.java

@@ -451,7 +451,7 @@ public class SessionFilter extends AbstractPwmFilter {
 
 
         { // check to make sure we werent handed a non-http uri.
         { // check to make sure we werent handed a non-http uri.
             final String scheme = inputURI.getScheme();
             final String scheme = inputURI.getScheme();
-            if (scheme != null && !scheme.isEmpty() && !scheme.equalsIgnoreCase("http") && !scheme.equals("https")) {
+            if (scheme != null && !scheme.isEmpty() && !"http".equalsIgnoreCase(scheme) && !"https".equals(scheme)) {
                 final String errorMsg = "unsupported url scheme";
                 final String errorMsg = "unsupported url scheme";
                 throw new PwmOperationalException(new ErrorInformation(PwmError.ERROR_REDIRECT_ILLEGAL,errorMsg));
                 throw new PwmOperationalException(new ErrorInformation(PwmError.ERROR_REDIRECT_ILLEGAL,errorMsg));
             }
             }
@@ -502,7 +502,7 @@ public class SessionFilter extends AbstractPwmFilter {
                         LOGGER.trace(sessionLabel, "negative URL match for regex pattern: " + strPattern);
                         LOGGER.trace(sessionLabel, "negative URL match for regex pattern: " + strPattern);
                     }
                     }
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    LOGGER.error(sessionLabel, "error while testing URL match for regex pattern: '" + loopFragment + "', error: " + e.getMessage());;
+                    LOGGER.error(sessionLabel, "error while testing URL match for regex pattern: '" + loopFragment + "', error: " + e.getMessage());
                 }
                 }
 
 
             } else {
             } else {

+ 8 - 8
src/main/java/password/pwm/http/servlet/CommandServlet.java

@@ -97,21 +97,21 @@ public class CommandServlet extends AbstractPwmServlet {
 
 
         LOGGER.trace(pwmSession, "received request for action " + action);
         LOGGER.trace(pwmSession, "received request for action " + action);
 
 
-        if (action.equalsIgnoreCase("idleUpdate")) {
+        if ("idleUpdate".equalsIgnoreCase(action)) {
             processIdleUpdate(pwmRequest);
             processIdleUpdate(pwmRequest);
-        } else if (action.equalsIgnoreCase("checkResponses") || action.equalsIgnoreCase("checkIfResponseConfigNeeded")) {
+        } else if ("checkResponses".equalsIgnoreCase(action) || "checkIfResponseConfigNeeded".equalsIgnoreCase(action)) {
             CheckCommands.processCheckResponses(pwmRequest);
             CheckCommands.processCheckResponses(pwmRequest);
-        } else if (action.equalsIgnoreCase("checkExpire")) {
+        } else if ("checkExpire".equalsIgnoreCase(action)) {
             CheckCommands.processCheckExpire(pwmRequest);
             CheckCommands.processCheckExpire(pwmRequest);
-        } else if (action.equalsIgnoreCase("checkProfile") || action.equalsIgnoreCase("checkAttributes")) {
+        } else if ("checkProfile".equalsIgnoreCase(action) || "checkAttributes".equalsIgnoreCase(action)) {
             CheckCommands.processCheckProfile(pwmRequest);
             CheckCommands.processCheckProfile(pwmRequest);
-        } else if (action.equalsIgnoreCase("checkAll")) {
+        } else if ("checkAll".equalsIgnoreCase(action)) {
             CheckCommands.processCheckAll(pwmRequest);
             CheckCommands.processCheckAll(pwmRequest);
-        } else if (action.equalsIgnoreCase("continue")) {
+        } else if ("continue".equalsIgnoreCase(action)) {
             processContinue(pwmRequest);
             processContinue(pwmRequest);
-        } else if (action.equalsIgnoreCase("pageLeaveNotice")) {
+        } else if ("pageLeaveNotice".equalsIgnoreCase(action)) {
             processPageLeaveNotice(pwmRequest);
             processPageLeaveNotice(pwmRequest);
-        } else if (action.equalsIgnoreCase("csp-report")) {
+        } else if ("csp-report".equalsIgnoreCase(action)) {
             processCspReport(pwmRequest);
             processCspReport(pwmRequest);
         } else {
         } else {
             final ErrorInformation errorInformation = new ErrorInformation(PwmError.ERROR_UNKNOWN,"unknown command sent to CommandServlet: " + action);
             final ErrorInformation errorInformation = new ErrorInformation(PwmError.ERROR_UNKNOWN,"unknown command sent to CommandServlet: " + action);

+ 1 - 1
src/main/java/password/pwm/http/servlet/configeditor/ConfigEditorServlet.java

@@ -531,7 +531,7 @@ public class ConfigEditorServlet extends AbstractPwmServlet {
             throws IOException, PwmUnrecoverableException {
             throws IOException, PwmUnrecoverableException {
         {
         {
             final String updateDescriptionTextCmd = pwmRequest.readParameterAsString("updateNotesText");
             final String updateDescriptionTextCmd = pwmRequest.readParameterAsString("updateNotesText");
-            if (updateDescriptionTextCmd != null && updateDescriptionTextCmd.equalsIgnoreCase("true")) {
+            if (updateDescriptionTextCmd != null && "true".equalsIgnoreCase(updateDescriptionTextCmd)) {
                 try {
                 try {
                     final String bodyString = pwmRequest.readRequestBodyAsString();
                     final String bodyString = pwmRequest.readRequestBodyAsString();
                     final String value = JsonUtil.deserialize(bodyString, String.class);
                     final String value = JsonUtil.deserialize(bodyString, String.class);

+ 1 - 1
src/main/java/password/pwm/http/tag/url/PwmUrlTag.java

@@ -158,7 +158,7 @@ public class PwmUrlTag extends PwmAbstractTag {
 
 
             themeName = figureThemeName(pwmRequest);
             themeName = figureThemeName(pwmRequest);
 
 
-            if (themeName.equals("custom")) {
+            if ("custom".equals(themeName)) {
                 if (theme_url == PwmThemeURL.MOBILE_THEME_URL) {
                 if (theme_url == PwmThemeURL.MOBILE_THEME_URL) {
                     themeURL = pwmApplication.getConfig().readSettingAsString(PwmSetting.DISPLAY_CSS_CUSTOM_MOBILE_STYLE);
                     themeURL = pwmApplication.getConfig().readSettingAsString(PwmSetting.DISPLAY_CSS_CUSTOM_MOBILE_STYLE);
                 } else {
                 } else {

+ 1 - 1
src/main/java/password/pwm/i18n/PwmLocaleBundle.java

@@ -46,7 +46,7 @@ public enum PwmLocaleBundle {
 
 
     private final Class<? extends PwmDisplayBundle> theClass;
     private final Class<? extends PwmDisplayBundle> theClass;
     private final boolean adminOnly;
     private final boolean adminOnly;
-    private Set<String> keys = null;
+    private Set<String> keys;
 
 
     PwmLocaleBundle(final Class<? extends PwmDisplayBundle> theClass, final boolean adminOnly) {
     PwmLocaleBundle(final Class<? extends PwmDisplayBundle> theClass, final boolean adminOnly) {
         this.theClass = theClass;
         this.theClass = theClass;

+ 1 - 1
src/main/java/password/pwm/svc/report/ReportSettings.java

@@ -42,7 +42,7 @@ class ReportSettings implements Serializable {
     
     
     private TimeDuration maxCacheAge = new TimeDuration(TimeDuration.DAY.getTotalMilliseconds() * 90);
     private TimeDuration maxCacheAge = new TimeDuration(TimeDuration.DAY.getTotalMilliseconds() * 90);
     private String searchFilter = null;
     private String searchFilter = null;
-    private int jobOffsetSeconds = 0;
+    private int jobOffsetSeconds;
     private int maxSearchSize = 100 * 1000;
     private int maxSearchSize = 100 * 1000;
     private List<Integer> trackDays = new ArrayList<>();
     private List<Integer> trackDays = new ArrayList<>();
     private int reportJobThreads = 1;
     private int reportJobThreads = 1;

+ 1 - 1
src/main/java/password/pwm/svc/stats/EventRateMeter.java

@@ -32,7 +32,7 @@ public class EventRateMeter implements Serializable {
     private final TimeDuration maxDuration;
     private final TimeDuration maxDuration;
 
 
     private MovingAverage movingAverage;
     private MovingAverage movingAverage;
-    private double remainder = 0;
+    private double remainder;
 
 
     public EventRateMeter(final TimeDuration maxDuration) {
     public EventRateMeter(final TimeDuration maxDuration) {
         if (maxDuration == null) {
         if (maxDuration == null) {

+ 2 - 1
src/main/java/password/pwm/svc/stats/StatisticsBundle.java

@@ -23,6 +23,7 @@
 package password.pwm.svc.stats;
 package password.pwm.svc.stats;
 
 
 import password.pwm.util.java.JsonUtil;
 import password.pwm.util.java.JsonUtil;
+import password.pwm.util.java.StringUtil;
 import password.pwm.util.logging.PwmLogger;
 import password.pwm.util.logging.PwmLogger;
 
 
 import java.io.Serializable;
 import java.io.Serializable;
@@ -66,7 +67,7 @@ public class StatisticsBundle {
 
 
         for (final Statistic loopStat : Statistic.values()) {
         for (final Statistic loopStat : Statistic.values()) {
             final String value = srcMap.get(loopStat);
             final String value = srcMap.get(loopStat);
-            if (value != null && !value.equals("")) {
+            if (!StringUtil.isEmpty(value)) {
                 bundle.valueMap.put(loopStat, value);
                 bundle.valueMap.put(loopStat, value);
             }
             }
         }
         }

+ 3 - 3
src/main/java/password/pwm/util/cli/MainOptions.java

@@ -41,9 +41,9 @@ public class MainOptions implements Serializable {
     private static final String OPT_FORCE = "-force";
     private static final String OPT_FORCE = "-force";
 
 
 
 
-    private PwmLogLevel pwmLogLevel = null;
-    private File applicationPath = null;
-    private boolean forceFlag = false;
+    private PwmLogLevel pwmLogLevel;
+    private File applicationPath;
+    private boolean forceFlag;
     private Collection<PwmEnvironment.ApplicationFlag> applicationFlags;
     private Collection<PwmEnvironment.ApplicationFlag> applicationFlags;
     private String[] remainingArguments;
     private String[] remainingArguments;
 
 

+ 1 - 1
src/main/java/password/pwm/util/db/DatabaseAccessorImpl.java

@@ -234,7 +234,7 @@ public class DatabaseAccessorImpl implements PwmService, DatabaseAccessor {
             final Connection connection = driver.connect(connectionURL, connectionProperties);
             final Connection connection = driver.connect(connectionURL, connectionProperties);
 
 
 
 
-            final Map<PwmAboutProperty,String> debugProps = getConnectionDebugProperties(connection);;
+            final Map<PwmAboutProperty,String> debugProps = getConnectionDebugProperties(connection);
             LOGGER.debug("connected to database " + connectionURL + ", properties: " + JsonUtil.serializeMap(debugProps));
             LOGGER.debug("connected to database " + connectionURL + ", properties: " + JsonUtil.serializeMap(debugProps));
 
 
             connection.setAutoCommit(true);
             connection.setAutoCommit(true);

+ 1 - 1
src/main/java/password/pwm/util/macro/StandardMacros.java

@@ -146,7 +146,7 @@ public abstract class StandardMacros {
             }
             }
 
 
             final String ldapValue;
             final String ldapValue;
-            if (ldapAttr.equalsIgnoreCase("dn")) {
+            if ("dn".equalsIgnoreCase(ldapAttr)) {
                 ldapValue = userDataReader.getUserDN();
                 ldapValue = userDataReader.getUserDN();
             } else {
             } else {
                 try {
                 try {

+ 1 - 1
src/main/java/password/pwm/util/queue/SmsQueueManager.java

@@ -463,7 +463,7 @@ public class SmsQueueManager implements PwmService {
             LOGGER.trace("preparing to send SMS data: " + requestData);
             LOGGER.trace("preparing to send SMS data: " + requestData);
             try {
             try {
                 final HttpRequestBase httpRequest;
                 final HttpRequestBase httpRequest;
-                if (gatewayMethod.equalsIgnoreCase("POST")) {
+                if ("POST".equalsIgnoreCase(gatewayMethod)) {
                     // POST request
                     // POST request
                     httpRequest = new HttpPost(gatewayUrl);
                     httpRequest = new HttpPost(gatewayUrl);
                     if (contentType != null && contentType.length()>0) {
                     if (contentType != null && contentType.length()>0) {

+ 1 - 1
src/main/java/password/pwm/util/secure/ChecksumInputStream.java

@@ -112,7 +112,7 @@ public class ChecksumInputStream extends InputStream {
         final byte[] buffer = new byte[1024];
         final byte[] buffer = new byte[1024];
 
 
         while (read(buffer) > 0) {
         while (read(buffer) > 0) {
-            ; // read out the remainder of the stream contents
+            // read out the remainder of the stream contents
         }
         }
 
 
         return getInProgressChecksum();
         return getInProgressChecksum();