Browse Source

add error-prone to builder + fixes and refactorings

Jason Rivard 5 years ago
parent
commit
25459d4d5c
41 changed files with 184 additions and 173 deletions
  1. 3 0
      pom.xml
  2. 1 1
      rest-test-service/src/main/java/password/pwm/resttest/RestTestExternalTokenDestinationServlet.java
  3. 28 1
      server/pom.xml
  4. 1 1
      server/src/main/java/password/pwm/PwmConstants.java
  5. 3 2
      server/src/main/java/password/pwm/bean/UserIdentity.java
  6. 1 1
      server/src/main/java/password/pwm/config/PwmSettingXml.java
  7. 5 3
      server/src/main/java/password/pwm/config/option/WebServiceUsage.java
  8. 2 3
      server/src/main/java/password/pwm/config/stored/StoredConfigItemKey.java
  9. 1 1
      server/src/main/java/password/pwm/health/CertificateChecker.java
  10. 1 1
      server/src/main/java/password/pwm/health/ConfigurationChecker.java
  11. 2 0
      server/src/main/java/password/pwm/http/bean/ConfigManagerBean.java
  12. 1 1
      server/src/main/java/password/pwm/http/bean/SetupOtpBean.java
  13. 1 2
      server/src/main/java/password/pwm/http/filter/ApplicationModeFilter.java
  14. 3 1
      server/src/main/java/password/pwm/http/filter/AuthenticationFilter.java
  15. 1 1
      server/src/main/java/password/pwm/http/servlet/LogoutServlet.java
  16. 1 1
      server/src/main/java/password/pwm/http/servlet/changepw/ChangePasswordServlet.java
  17. 3 3
      server/src/main/java/password/pwm/http/servlet/configmanager/ConfigManagerCertificatesServlet.java
  18. 1 1
      server/src/main/java/password/pwm/http/servlet/forgottenpw/ForgottenPasswordStateMachine.java
  19. 1 1
      server/src/main/java/password/pwm/http/tag/PasswordRequirementsTag.java
  20. 2 2
      server/src/main/java/password/pwm/ldap/LdapOperationsHelper.java
  21. 22 62
      server/src/main/java/password/pwm/ldap/PasswordChangeProgressChecker.java
  22. 0 1
      server/src/main/java/password/pwm/ldap/search/UserSearchEngine.java
  23. 1 1
      server/src/main/java/password/pwm/svc/email/EmailService.java
  24. 1 1
      server/src/main/java/password/pwm/svc/event/AuditService.java
  25. 5 3
      server/src/main/java/password/pwm/svc/event/LdapXmlUserHistory.java
  26. 1 1
      server/src/main/java/password/pwm/svc/pwnotify/PwNotifyService.java
  27. 1 1
      server/src/main/java/password/pwm/svc/report/ReportService.java
  28. 1 1
      server/src/main/java/password/pwm/svc/telemetry/TelemetryService.java
  29. 1 1
      server/src/main/java/password/pwm/svc/wordlist/Wordlist.java
  30. 1 1
      server/src/main/java/password/pwm/util/PwmScheduler.java
  31. 1 1
      server/src/main/java/password/pwm/util/db/DatabaseAccessorImpl.java
  32. 2 2
      server/src/main/java/password/pwm/util/db/JDBCDriverLoader.java
  33. 2 3
      server/src/main/java/password/pwm/util/java/JavaHelper.java
  34. 10 23
      server/src/main/java/password/pwm/util/java/TimeDuration.java
  35. 1 1
      server/src/main/java/password/pwm/util/localdb/DerbyLocalDB.java
  36. 1 1
      server/src/main/java/password/pwm/util/localdb/LocalDBFactory.java
  37. 48 15
      server/src/main/java/password/pwm/util/localdb/LocalDBStoredQueue.java
  38. 3 7
      server/src/main/java/password/pwm/util/logging/PwmLogEvent.java
  39. 7 7
      server/src/main/java/password/pwm/util/logging/PwmLogLevel.java
  40. 9 9
      server/src/main/java/password/pwm/util/operations/ActionExecutor.java
  41. 4 4
      server/src/main/java/password/pwm/util/password/RandomPasswordGenerator.java

+ 3 - 0
pom.xml

@@ -202,6 +202,9 @@
                         </goals>
                         <configuration>
                             <rules>
+                                <requireJavaVersion>
+                                    <version>[11,)</version>
+                                </requireJavaVersion>
                                 <requireMavenVersion>
                                     <version>${pwm.minimum.maven.version}</version>
                                 </requireMavenVersion>

+ 1 - 1
rest-test-service/src/main/java/password/pwm/resttest/RestTestExternalTokenDestinationServlet.java

@@ -47,7 +47,7 @@ public class RestTestExternalTokenDestinationServlet extends HttpServlet
         System.out.println( "--External Token Destination--" );
         final InputStream inputStream = req.getInputStream();
         final String body = IOUtils.toString( inputStream );
-        final JsonObject jsonObject = new JsonParser().parse( body ).getAsJsonObject();
+        final JsonObject jsonObject = JsonParser.parseString( body ).getAsJsonObject();
         final String email = jsonObject.getAsJsonObject( "tokenDestination" ).get( "email" ).getAsString();
         final String sms = jsonObject.getAsJsonObject( "tokenDestination" ).get( "sms" ).getAsString();
         final String displayValue = "YourTokenDestination";

+ 28 - 1
server/pom.xml

@@ -36,9 +36,36 @@
             </activation>
         </profile>
     </profiles>
-
     <build>
         <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.8.1</version>
+                <configuration>
+                    <source>${maven.compiler.source}</source>
+                    <target>${maven.compiler.target}</target>
+                    <showWarnings>true</showWarnings>
+                    <compilerArgs>
+                        <arg>-Xmaxwarns</arg>
+                        <arg>9999</arg>
+                        <arg>-XDcompilePolicy=simple</arg>
+                        <arg>-Xplugin:ErrorProne</arg>
+                    </compilerArgs>
+                    <annotationProcessorPaths>
+                        <path>
+                            <groupId>com.google.errorprone</groupId>
+                            <artifactId>error_prone_core</artifactId>
+                            <version>2.4.0</version>
+                        </path>
+                        <path>
+                            <groupId>org.projectlombok</groupId>
+                            <artifactId>lombok</artifactId>
+                            <version>1.18.12</version>
+                        </path>
+                    </annotationProcessorPaths>
+                </configuration>
+            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>

+ 1 - 1
server/src/main/java/password/pwm/PwmConstants.java

@@ -282,7 +282,7 @@ public abstract class PwmConstants
         json( "application/json" ),
         html( "text/html" ),;
 
-        private String headerValue;
+        private final String headerValue;
 
         AcceptValue( final String headerValue )
         {

+ 3 - 2
server/src/main/java/password/pwm/bean/UserIdentity.java

@@ -22,6 +22,7 @@ package password.pwm.bean;
 
 import com.novell.ldapchai.ChaiUser;
 import com.novell.ldapchai.exception.ChaiException;
+import org.jetbrains.annotations.NotNull;
 import password.pwm.PwmApplication;
 import password.pwm.config.Configuration;
 import password.pwm.config.profile.LdapProfile;
@@ -38,7 +39,7 @@ import password.pwm.util.java.TimeDuration;
 import java.io.Serializable;
 import java.util.StringTokenizer;
 
-public class UserIdentity implements Serializable, Comparable
+public class UserIdentity implements Serializable, Comparable<UserIdentity>
 {
     private static final long serialVersionUID = 1L;
 
@@ -239,7 +240,7 @@ public class UserIdentity implements Serializable, Comparable
     }
 
     @Override
-    public int compareTo( final Object o )
+    public int compareTo( @NotNull final UserIdentity o )
     {
         final String thisStr = ( ldapProfile == null ? "_" : ldapProfile ) + userDN;
         final UserIdentity otherIdentity = ( UserIdentity ) o;

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

@@ -144,7 +144,7 @@ public class PwmSettingXml
                 definedTemplates.add( template );
             }
         }
-        return definedTemplates;
+        return Collections.unmodifiableSet( definedTemplates );
     }
 }
 

+ 5 - 3
server/src/main/java/password/pwm/config/option/WebServiceUsage.java

@@ -24,7 +24,7 @@ import password.pwm.ws.server.RestAuthenticationType;
 
 import java.util.Arrays;
 import java.util.Collections;
-import java.util.HashSet;
+import java.util.EnumSet;
 import java.util.Set;
 import java.util.stream.Collectors;
 
@@ -43,11 +43,13 @@ public enum WebServiceUsage
     VerifyOtp( RestAuthenticationType.NAMED_SECRET, RestAuthenticationType.LDAP ),
     VerifyResponses( RestAuthenticationType.NAMED_SECRET, RestAuthenticationType.LDAP ),;
 
-    private Set<RestAuthenticationType> type;
+    private final Set<RestAuthenticationType> type;
 
     WebServiceUsage( final RestAuthenticationType... type )
     {
-        this.type = type == null ? Collections.emptySet() : Collections.unmodifiableSet( new HashSet<>( Arrays.asList( type ) ) );
+        final EnumSet<RestAuthenticationType> typeSet = EnumSet.noneOf( RestAuthenticationType.class );
+        typeSet.addAll( Arrays.asList( type ) );
+        this.type = Collections.unmodifiableSet( typeSet );
     }
 
     public Set<RestAuthenticationType> getTypes()

+ 2 - 3
server/src/main/java/password/pwm/config/stored/StoredConfigItemKey.java

@@ -32,7 +32,7 @@ import java.io.Serializable;
 import java.util.Locale;
 import java.util.Objects;
 
-public class StoredConfigItemKey implements Serializable, Comparable
+public class StoredConfigItemKey implements Serializable, Comparable<StoredConfigItemKey>
 {
     public enum RecordType
     {
@@ -224,11 +224,10 @@ public class StoredConfigItemKey implements Serializable, Comparable
     public String toString()
     {
         return getLabel( PwmConstants.DEFAULT_LOCALE );
-       // return getRecordType().name() + "-" + this.getRecordID() + "-" + this.getProfileID();
     }
 
     @Override
-    public int compareTo( final Object o )
+    public int compareTo( final StoredConfigItemKey o )
     {
         return getLabel( PwmConstants.DEFAULT_LOCALE ).compareTo( o.toString() );
     }

+ 1 - 1
server/src/main/java/password/pwm/health/CertificateChecker.java

@@ -146,7 +146,7 @@ public class CertificateChecker implements HealthChecker
                     return Collections.singletonList( record );
                 }
             }
-            return returnList;
+            return Collections.unmodifiableList( returnList );
         }
         return Collections.emptyList();
     }

+ 1 - 1
server/src/main/java/password/pwm/health/ConfigurationChecker.java

@@ -95,7 +95,7 @@ public class ConfigurationChecker implements HealthChecker
 
         records.addAll( doHealthCheck( config, PwmConstants.DEFAULT_LOCALE ) );
 
-        return records;
+        return Collections.unmodifiableList( records );
     }
 
     public List<HealthRecord> doHealthCheck( final Configuration config, final Locale locale )

+ 2 - 0
server/src/main/java/password/pwm/http/bean/ConfigManagerBean.java

@@ -21,6 +21,7 @@
 package password.pwm.http.bean;
 
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 import password.pwm.config.option.SessionBeanMode;
 import password.pwm.config.stored.StoredConfiguration;
 
@@ -28,6 +29,7 @@ import java.util.Collections;
 import java.util.Set;
 
 @Data
+@EqualsAndHashCode( callSuper = false )
 public class ConfigManagerBean extends PwmSessionBean
 {
     private static final long serialVersionUID = 1L;

+ 1 - 1
server/src/main/java/password/pwm/http/bean/SetupOtpBean.java

@@ -98,7 +98,7 @@ public class SetupOtpBean extends PwmSessionBean
                 LOGGER.error( () -> ex.getMessage(), ex );
             }
             random.setSeed( ( new Date() ).getTime() );
-            challenge = random.nextLong() % ( 10 ^ 6 );
+            challenge = random.nextLong() % ( 1_000_000 );
         }
         return challenge;
     }

+ 1 - 2
server/src/main/java/password/pwm/http/filter/ApplicationModeFilter.java

@@ -85,8 +85,7 @@ public class ApplicationModeFilter extends AbstractPwmFilter
     @Override
     boolean isInterested( final PwmApplicationMode mode, final PwmURL pwmURL )
     {
-        return !pwmURL.isRestService()
-                && !pwmURL.isRestService();
+        return !pwmURL.isRestService();
     }
 
     private static ProcessStatus checkConfigModes(

+ 3 - 1
server/src/main/java/password/pwm/http/filter/AuthenticationFilter.java

@@ -141,7 +141,9 @@ public class AuthenticationFilter extends AbstractPwmFilter
             final BasicAuthInfo originalBasicAuthInfo = pwmSession.getLoginInfoBean().getBasicAuth();
 
             //check to make sure basic auth info is same as currently known user in session.
-            if ( basicAuthInfo != null && originalBasicAuthInfo != null && !( originalBasicAuthInfo.equals( basicAuthInfo ) ) )
+            if ( basicAuthInfo != null
+                    && originalBasicAuthInfo != null
+                    && !originalBasicAuthInfo.equals( basicAuthInfo ) )
             {
                 // if we read here then user is using basic auth, and header has changed since last request
                 // this means something is screwy, so log out the session

+ 1 - 1
server/src/main/java/password/pwm/http/servlet/LogoutServlet.java

@@ -62,7 +62,7 @@ public class LogoutServlet extends ControlledPwmServlet
     private static final String PARAM_PASSWORD_MODIFIED = "passwordModified";
     private static final String PARAM_PUBLIC_ONLY = "publicOnly";
 
-    private enum LogoutAction implements ControlledPwmServlet.ProcessAction
+    private enum LogoutAction implements ProcessAction
     {
         showLogout,
         showTimeout,;

+ 1 - 1
server/src/main/java/password/pwm/http/servlet/changepw/ChangePasswordServlet.java

@@ -85,7 +85,7 @@ public abstract class ChangePasswordServlet extends ControlledPwmServlet
 {
     private static final PwmLogger LOGGER = PwmLogger.forClass( ChangePasswordServlet.class );
 
-    public enum ChangePasswordAction implements ControlledPwmServlet.ProcessAction
+    public enum ChangePasswordAction implements ProcessAction
     {
         checkProgress( HttpMethod.POST ),
         complete( HttpMethod.GET ),

+ 3 - 3
server/src/main/java/password/pwm/http/servlet/configmanager/ConfigManagerCertificatesServlet.java

@@ -215,7 +215,7 @@ public class ConfigManagerCertificatesServlet extends AbstractPwmServlet
 
     @Value
     @Builder
-    public static class CertificateDebugDataItem implements Serializable, Comparable
+    public static class CertificateDebugDataItem implements Serializable, Comparable<CertificateDebugDataItem>
     {
         private String menuLocation;
         private String subject;
@@ -226,14 +226,14 @@ public class ConfigManagerCertificatesServlet extends AbstractPwmServlet
         private String detail;
 
         @Override
-        public int compareTo( final Object o )
+        public int compareTo( final CertificateDebugDataItem o )
         {
             if ( this == o || this.equals( o ) )
             {
                 return 0;
             }
 
-            return expirationDate.compareTo( ( ( CertificateDebugDataItem ) o ).getExpirationDate() );
+            return expirationDate.compareTo( o.getExpirationDate() );
         }
     }
 }

+ 1 - 1
server/src/main/java/password/pwm/http/servlet/forgottenpw/ForgottenPasswordStateMachine.java

@@ -1097,7 +1097,7 @@ public class ForgottenPasswordStateMachine
 
 
         // add a bit of jitter to pretend like we're checking a data source
-        final long jitterMs = 300 + commonValues.getPwmApplication().getSecureService().pwmRandom().nextInt( 700 );
+        final long jitterMs = 300L + commonValues.getPwmApplication().getSecureService().pwmRandom().nextInt( 700 );
         TimeDuration.of( jitterMs, TimeDuration.Unit.MILLISECONDS ).pause();
 
         if ( userIdentity != null )

+ 1 - 1
server/src/main/java/password/pwm/http/tag/PasswordRequirementsTag.java

@@ -264,7 +264,7 @@ public class PasswordRequirementsTag extends TagSupport
                 {
                     returnValues.add( getLocalString( Message.Requirement_LastSpecial, maxValue, policyValues ) );
                 }
-                return returnValues;
+                return Collections.unmodifiableList( returnValues );
             }
         }
     }

+ 2 - 2
server/src/main/java/password/pwm/ldap/LdapOperationsHelper.java

@@ -72,11 +72,11 @@ import java.io.IOException;
 import java.net.URLConnection;
 import java.security.cert.X509Certificate;
 import java.time.Instant;
+import java.util.ArrayDeque;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -863,7 +863,7 @@ public class LdapOperationsHelper
             throws PwmUnrecoverableException, PwmOperationalException
     {
         final UserSearchEngine userSearchEngine = pwmApplication.getUserSearchEngine();
-        final Queue<UserIdentity> resultSet = new LinkedList<>();
+        final Queue<UserIdentity> resultSet = new ArrayDeque<>();
         final long searchTimeoutMs = JavaHelper.silentParseLong(
                 pwmApplication.getConfig().readAppProperty( AppProperty.REPORTING_LDAP_SEARCH_TIMEOUT ),
                 30_000 );

+ 22 - 62
server/src/main/java/password/pwm/ldap/PasswordChangeProgressChecker.java

@@ -20,6 +20,9 @@
 
 package password.pwm.ldap;
 
+import lombok.Builder;
+import lombok.Data;
+import lombok.Value;
 import password.pwm.AppProperty;
 import password.pwm.PwmApplication;
 import password.pwm.PwmConstants;
@@ -85,6 +88,7 @@ public class PasswordChangeProgressChecker
         completedReplicationRecord = makeReplicaProgressRecord( Percent.ONE_HUNDRED );
     }
 
+    @Value
     public static class PasswordChangeProgress implements Serializable
     {
         private boolean complete;
@@ -100,38 +104,10 @@ public class PasswordChangeProgressChecker
                 "",
                 ""
         );
-
-        public PasswordChangeProgress(
-                final boolean complete,
-                final BigDecimal percentComplete,
-                final Collection<ProgressRecord> messages,
-                final String elapsedSeconds,
-                final String estimatedRemainingSeconds
-        )
-        {
-            this.complete = complete;
-            this.percentComplete = percentComplete;
-            this.messages = messages;
-            this.elapsedSeconds = elapsedSeconds;
-            this.estimatedRemainingSeconds = estimatedRemainingSeconds;
-        }
-
-        public boolean isComplete( )
-        {
-            return complete;
-        }
-
-        public BigDecimal getPercentComplete( )
-        {
-            return percentComplete;
-        }
-
-        public Collection<ProgressRecord> getItemCompletion( )
-        {
-            return messages;
-        }
     }
 
+    @Value
+    @Builder
     public static class ProgressRecord implements Serializable
     {
         private String key;
@@ -141,26 +117,12 @@ public class PasswordChangeProgressChecker
         private boolean show;
     }
 
+    @Data
     public static class ProgressTracker implements Serializable
     {
         private Instant beginTime = Instant.now();
         private Instant lastReplicaCheckTime;
         private final Map<String, ProgressRecord> itemCompletions = new HashMap<>();
-
-        public Instant getBeginTime( )
-        {
-            return beginTime;
-        }
-
-        public Instant getLastReplicaCheckTime( )
-        {
-            return lastReplicaCheckTime;
-        }
-
-        public Map<String, ProgressRecord> getItemCompletions( )
-        {
-            return itemCompletions;
-        }
     }
 
     public PasswordChangeProgress figureProgress(
@@ -311,10 +273,7 @@ public class PasswordChangeProgressChecker
     }
 
 
-    private ProgressRecord figureReplicationStatusCompletion(
-            final ProgressTracker tracker
-
-    )
+    private ProgressRecord figureReplicationStatusCompletion( final ProgressTracker tracker )
     {
         final long initDelayMs = Long.parseLong( pwmApplication.getConfig().readAppProperty( AppProperty.LDAP_PASSWORD_REPLICA_CHECK_INIT_DELAY_MS ) );
         final long cycleDelayMs = Long.parseLong( pwmApplication.getConfig().readAppProperty( AppProperty.LDAP_PASSWORD_REPLICA_CHECK_CYCLE_DELAY_MS ) );
@@ -324,15 +283,15 @@ public class PasswordChangeProgressChecker
         if ( passwordSyncCheckMode == PasswordSyncCheckMode.DISABLED )
         {
             LOGGER.trace( pwmSession, () -> "skipping replica sync check, disabled" );
-            return tracker.itemCompletions.get( PROGRESS_KEY_REPLICATION );
+            return tracker.getItemCompletions().get( PROGRESS_KEY_REPLICATION );
         }
 
-        if ( tracker.itemCompletions.containsKey( PROGRESS_KEY_REPLICATION ) )
+        if ( tracker.getItemCompletions().containsKey( PROGRESS_KEY_REPLICATION ) )
         {
-            if ( tracker.itemCompletions.get( PROGRESS_KEY_REPLICATION ).complete )
+            if ( tracker.getItemCompletions().get( PROGRESS_KEY_REPLICATION ).complete )
             {
                 LOGGER.trace( pwmSession, () -> "skipping replica sync check, replica sync completed previously" );
-                return tracker.itemCompletions.get( PROGRESS_KEY_REPLICATION );
+                return tracker.getItemCompletions().get( PROGRESS_KEY_REPLICATION );
             }
         }
 
@@ -350,7 +309,7 @@ public class PasswordChangeProgressChecker
             return null;
         }
 
-        tracker.lastReplicaCheckTime = Instant.now();
+        tracker.setLastReplicaCheckTime( Instant.now() );
         LOGGER.trace( pwmSession, () -> "beginning password replication time check for " + userIdentity.toDelimitedKey() );
 
         try
@@ -392,12 +351,7 @@ public class PasswordChangeProgressChecker
 
     private ProgressRecord makeReplicaProgressRecord( final Percent pctComplete )
     {
-        final ProgressRecord progressRecord = new ProgressRecord();
-        progressRecord.key = PROGRESS_KEY_REPLICATION;
-        progressRecord.complete = pctComplete.isComplete();
-        progressRecord.percentComplete = pctComplete.asBigDecimal( 2 );
-        progressRecord.show = passwordSyncCheckMode == PasswordSyncCheckMode.ENABLED_SHOW;
-        progressRecord.label = LocaleHelper.getLocalizedMessage(
+        final String label = LocaleHelper.getLocalizedMessage(
                 locale,
                 "Display_PasswordReplicationStatus",
                 pwmApplication.getConfig(),
@@ -405,9 +359,15 @@ public class PasswordChangeProgressChecker
                 new String[]
                         {
                                 pctComplete.pretty(),
-                        }
+                                }
         );
 
-        return progressRecord;
+        return ProgressRecord.builder()
+                .key( PROGRESS_KEY_REPLICATION )
+                .complete( pctComplete.isComplete() )
+                .percentComplete( pctComplete.asBigDecimal( 2 ) )
+                .show( passwordSyncCheckMode == PasswordSyncCheckMode.ENABLED_SHOW )
+                .label( label )
+                .build();
     }
 }

+ 0 - 1
server/src/main/java/password/pwm/ldap/search/UserSearchEngine.java

@@ -686,7 +686,6 @@ public class UserSearchEngine implements PwmService
         for ( final UserSearchJob jobInfo : userSearchJobs )
         {
             final UserSearchJobParameters params = jobInfo.getUserSearchJobParameters();
-            final Instant startTime = Instant.now();
             if ( results.size() > jobInfo.getUserSearchJobParameters().getMaxResults() )
             {
                 final FutureTask<Map<UserIdentity, Map<String, String>>> futureTask = jobInfo.getFutureTask();

+ 1 - 1
server/src/main/java/password/pwm/svc/email/EmailService.java

@@ -174,7 +174,7 @@ public class EmailService implements PwmService
             records.add( HealthRecord.forMessage( HealthMessage.Email_SendFailure, errorInformation.toDebugStr() ) );
         }
 
-        return records;
+        return Collections.unmodifiableList( records );
     }
 
     @Override

+ 1 - 1
server/src/main/java/password/pwm/svc/event/AuditService.java

@@ -231,7 +231,7 @@ public class AuditService implements PwmService
             healthRecords.add( new HealthRecord( HealthStatus.WARN, HealthTopic.Audit, lastError.toDebugStr() ) );
         }
 
-        return healthRecords;
+        return Collections.unmodifiableList( healthRecords );
     }
 
     public Iterator<AuditRecord> readVault( )

+ 5 - 3
server/src/main/java/password/pwm/svc/event/LdapXmlUserHistory.java

@@ -45,8 +45,10 @@ import java.io.IOException;
 import java.io.Serializable;
 import java.io.StringReader;
 import java.time.Instant;
+import java.util.ArrayDeque;
+import java.util.ArrayList;
 import java.util.Collections;
-import java.util.LinkedList;
+import java.util.Deque;
 import java.util.List;
 
 /**
@@ -220,7 +222,7 @@ class LdapXmlUserHistory implements UserHistoryStore
 
     private static class StoredHistory
     {
-        private final LinkedList<StoredEvent> records = new LinkedList<>();
+        private final Deque<StoredEvent> records = new ArrayDeque<>();
 
         void addEvent( final StoredEvent storedEvent )
         {
@@ -237,7 +239,7 @@ class LdapXmlUserHistory implements UserHistoryStore
 
         List<UserAuditRecord> asAuditRecords( final UserInfo userInfoBean )
         {
-            final List<UserAuditRecord> returnList = new LinkedList<>();
+            final List<UserAuditRecord> returnList = new ArrayList<>();
             for ( final StoredEvent loopEvent : records )
             {
                 returnList.add( loopEvent.asAuditRecord( userInfoBean ) );

+ 1 - 1
server/src/main/java/password/pwm/svc/pwnotify/PwNotifyService.java

@@ -237,7 +237,7 @@ public class PwNotifyService extends AbstractPwmService implements PwmService
             LOGGER.error( SessionLabel.PWNOTIFY_SESSION_LABEL, () -> "error while generating health information: " + e.getMessage() );
         }
 
-        return returnRecords;
+        return Collections.unmodifiableList( returnRecords );
     }
 
     @Override

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

@@ -513,9 +513,9 @@ public class ReportService implements PwmService
                             final TimeDuration totalUpdateTime = TimeDuration.fromCurrent( startUpdateTime );
                             avgTracker.addSample( totalUpdateTime.asMillis() );
 
+                            updateTimeLock.lock();
                             try
                             {
-                                updateTimeLock.lock();
                                 final TimeDuration scaledTime = TimeDuration.of( totalUpdateTime.asMillis() / threadCount, TimeDuration.Unit.MILLISECONDS );
                                 reportStatus.updateAndGet( reportStatusInfo -> reportStatusInfo.toBuilder()
                                         .jobDuration( reportStatusInfo.getJobDuration().add( scaledTime ) )

+ 1 - 1
server/src/main/java/password/pwm/svc/telemetry/TelemetryService.java

@@ -163,7 +163,7 @@ public class TelemetryService implements PwmService
         {
             final String senderClass = settings.getSenderImplementation();
             final Class theClass = Class.forName( senderClass );
-            telemetrySender = ( TelemetrySender ) theClass.newInstance();
+            telemetrySender = ( TelemetrySender ) theClass.getDeclaredConstructor().newInstance();
         }
         catch ( final Exception e )
         {

+ 1 - 1
server/src/main/java/password/pwm/svc/wordlist/Wordlist.java

@@ -45,7 +45,7 @@ public interface Wordlist extends PwmService
 
     ErrorInformation getAutoImportError( );
 
-    AbstractWordlist.Activity getActivity();
+    Wordlist.Activity getActivity();
 
     String getImportPercentComplete();
 

+ 1 - 1
server/src/main/java/password/pwm/util/PwmScheduler.java

@@ -255,7 +255,7 @@ public class PwmScheduler
                 @Override
                 public boolean isDone()
                 {
-                    return hasFailed || innerFuture != null && innerFuture.isDone();
+                    return hasFailed || ( innerFuture != null && innerFuture.isDone() );
                 }
 
                 @Override

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

@@ -421,9 +421,9 @@ class DatabaseAccessorImpl implements DatabaseAccessor
                     "iterator #" + counter + " close", table, null, null );
             traceBegin( debugInfo );
 
+            lock.lock();
             try
             {
-                lock.lock();
                 outstandingIterators.remove( this );
 
                 if ( resultSet != null )

+ 2 - 2
server/src/main/java/password/pwm/util/db/JDBCDriverLoader.java

@@ -251,7 +251,7 @@ public class JDBCDriverLoader
 
                 //Create object of loaded class
                 final Class jdbcDriverClass = urlClassLoader.loadClass( jdbcClassName );
-                final Driver driver = ( Driver ) jdbcDriverClass.newInstance();
+                final Driver driver = ( Driver ) jdbcDriverClass.getDeclaredConstructor().newInstance();
 
                 LOGGER.debug( () -> "successfully loaded JDBC database driver '" + jdbcClassName + "' from application configuration" );
 
@@ -348,7 +348,7 @@ public class JDBCDriverLoader
             {
                 //Create object of loaded class
                 final Class jdbcDriverClass = urlClassLoader.loadClass( jdbcClassName );
-                final Driver driver = ( Driver ) jdbcDriverClass.newInstance();
+                final Driver driver = ( Driver ) jdbcDriverClass.getDeclaredConstructor().newInstance();
                 LOGGER.debug( () -> "successfully loaded JDBC database driver '" + jdbcClassName + "' from application configuration" );
                 return driver;
             }

+ 2 - 3
server/src/main/java/password/pwm/util/java/JavaHelper.java

@@ -45,7 +45,6 @@ import java.lang.management.ThreadInfo;
 import java.lang.reflect.Method;
 import java.net.URI;
 import java.nio.ByteBuffer;
-
 import java.time.Instant;
 import java.time.temporal.ChronoUnit;
 import java.util.ArrayList;
@@ -519,7 +518,7 @@ public class JavaHelper
             return Optional.empty();
         }
 
-        if ( inputException.getClass().isInstance( exceptionType ) )
+        if ( inputException.getClass().isAssignableFrom( exceptionType ) )
         {
             return Optional.of( ( T ) inputException );
         }
@@ -527,7 +526,7 @@ public class JavaHelper
         Throwable nextException = inputException.getCause();
         while ( nextException != null )
         {
-            if ( nextException.getClass().isInstance( exceptionType ) )
+            if ( nextException.getClass().isAssignableFrom( exceptionType ) )
             {
                 return Optional.of( ( T ) inputException );
             }

+ 10 - 23
server/src/main/java/password/pwm/util/java/TimeDuration.java

@@ -28,8 +28,6 @@ import password.pwm.util.i18n.LocaleHelper;
 import password.pwm.util.secure.PwmRandom;
 import password.pwm.util.secure.SecureService;
 
-import javax.annotation.CheckReturnValue;
-import javax.annotation.meta.When;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.text.DecimalFormat;
@@ -52,7 +50,7 @@ import java.util.function.BooleanSupplier;
  *
  * @author Jason D. Rivard
  */
-public class TimeDuration implements Comparable, Serializable
+public class TimeDuration implements Comparable<TimeDuration>, Serializable
 {
     public enum Unit
     {
@@ -287,10 +285,9 @@ public class TimeDuration implements Comparable, Serializable
         return this.compareTo( duration ) > 0;
     }
 
-    public int compareTo( final Object o )
+    public int compareTo( final TimeDuration o )
     {
-        final TimeDuration td = ( TimeDuration ) o;
-        final long otherMS = td.as( Unit.MILLISECONDS );
+        final long otherMS = o.as( Unit.MILLISECONDS );
         return Long.compare( ms, otherMS );
     }
 
@@ -434,40 +431,32 @@ public class TimeDuration implements Comparable, Serializable
 
     /**
      * Pause the calling thread the specified amount of time.
-     *
-     * @return time actually spent sleeping
      */
-    @CheckReturnValue( when = When.NEVER )
-    public TimeDuration pause( )
+    public void pause( )
     {
-        return pause( this, () -> false );
+        pause( this, () -> false );
     }
 
     /**
      * Pause the calling thread the specified amount of time.
-     *
-     * @return time actually spent sleeping
      */
-    @CheckReturnValue( when = When.NEVER )
-    public TimeDuration jitterPause( final SecureService secureService, final float factor )
+    public void jitterPause( final SecureService secureService, final float factor )
     {
         final PwmRandom pwmRandom = secureService.pwmRandom();
         final long jitterMs = (long) ( this.ms * factor );
         final long deviation = pwmRandom.nextBoolean() ? jitterMs + this.ms : jitterMs - this.ms;
-        return pause( TimeDuration.of( deviation, Unit.MILLISECONDS ), () -> false );
+        pause( TimeDuration.of( deviation, Unit.MILLISECONDS ), () -> false );
     }
 
-    @CheckReturnValue( when = When.NEVER )
-    public TimeDuration pause(
+    public void pause(
             final BooleanSupplier interruptBoolean
     )
     {
         final long interruptMs = this.asMillis() / 100;
-        return pause( TimeDuration.of( interruptMs, Unit.MILLISECONDS ), interruptBoolean );
+        pause( TimeDuration.of( interruptMs, Unit.MILLISECONDS ), interruptBoolean );
     }
 
-    @CheckReturnValue( when = When.NEVER )
-    public TimeDuration pause(
+    public void pause(
             final TimeDuration interruptCheckInterval,
             final BooleanSupplier interruptBoolean
     )
@@ -486,8 +475,6 @@ public class TimeDuration implements Comparable, Serializable
                 // ignore
             }
         }
-
-        return TimeDuration.fromCurrent( startTime );
     }
 
     public Duration asDuration()

+ 1 - 1
server/src/main/java/password/pwm/util/localdb/DerbyLocalDB.java

@@ -127,7 +127,7 @@ public class DerbyLocalDB extends AbstractJDBCLocalDB
         try
         {
             //load driver.
-            driver = ( Driver ) Class.forName( driverClasspath ).newInstance();
+            driver = ( Driver ) Class.forName( driverClasspath ).getDeclaredConstructor().newInstance();
             final Connection connection = driver.connect( connectionURL, new Properties() );
             connection.setAutoCommit( false );
 

+ 1 - 1
server/src/main/java/password/pwm/util/localdb/LocalDBFactory.java

@@ -120,7 +120,7 @@ public class LocalDBFactory
         try
         {
             final Class c = Class.forName( className );
-            final Object impl = c.newInstance();
+            final Object impl = c.getDeclaredConstructor().newInstance();
             if ( !( impl instanceof LocalDBProvider ) )
             {
                 throw new Exception( "unable to createSharedHistoryManager new LocalDB, " + className + " is not instance of " + LocalDBProvider.class.getName() );

+ 48 - 15
server/src/main/java/password/pwm/util/localdb/LocalDBStoredQueue.java

@@ -22,6 +22,7 @@ package password.pwm.util.localdb;
 
 import password.pwm.PwmApplication;
 import password.pwm.util.java.ConditionalTaskExecutor;
+import password.pwm.util.java.JavaHelper;
 import password.pwm.util.java.TimeDuration;
 import password.pwm.util.logging.PwmLogger;
 
@@ -127,6 +128,7 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         }
     }
 
+    @Override
     public boolean isEmpty( )
     {
         try
@@ -139,6 +141,7 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         }
     }
 
+    @Override
     public Object[] toArray( )
     {
         final List<Object> returnList = new ArrayList<>();
@@ -149,6 +152,7 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         return returnList.toArray();
     }
 
+    @Override
     public <T> T[] toArray( final T[] a )
     {
         int index = 0;
@@ -160,11 +164,13 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         return a;
     }
 
+    @Override
     public boolean containsAll( final Collection<?> c )
     {
         throw new UnsupportedOperationException();
     }
 
+    @Override
     public boolean addAll( final Collection<? extends String> c )
     {
         try
@@ -186,11 +192,13 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         }
     }
 
+    @Override
     public boolean removeAll( final Collection<?> c )
     {
         throw new UnsupportedOperationException();
     }
 
+    @Override
     public boolean add( final String s )
     {
         try
@@ -204,11 +212,13 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         }
     }
 
+    @Override
     public boolean retainAll( final Collection<?> c )
     {
         throw new UnsupportedOperationException();
     }
 
+    @Override
     public void clear( )
     {
         try
@@ -221,16 +231,19 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         }
     }
 
+    @Override
     public boolean remove( final Object o )
     {
         throw new UnsupportedOperationException();
     }
 
+    @Override
     public boolean contains( final Object o )
     {
         throw new UnsupportedOperationException();
     }
 
+    @Override
     public int size( )
     {
         try
@@ -243,6 +256,7 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         }
     }
 
+    @Override
     public void addFirst( final String s )
     {
         try
@@ -255,6 +269,7 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         }
     }
 
+    @Override
     public void addLast( final String s )
     {
         try
@@ -267,6 +282,7 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         }
     }
 
+    @Override
     public boolean offerFirst( final String s )
     {
         try
@@ -280,6 +296,7 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         }
     }
 
+    @Override
     public boolean offerLast( final String s )
     {
         try
@@ -293,6 +310,7 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         }
     }
 
+    @Override
     public String removeFirst( )
     {
         final String value = pollFirst();
@@ -303,6 +321,7 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         return value;
     }
 
+    @Override
     public String removeLast( )
     {
         final String value = pollLast();
@@ -313,6 +332,7 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         return value;
     }
 
+    @Override
     public String pollFirst( )
     {
         try
@@ -330,6 +350,7 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         }
     }
 
+    @Override
     public String pollLast( )
     {
         try
@@ -347,6 +368,7 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         }
     }
 
+    @Override
     public String getFirst( )
     {
         final String value = peekFirst();
@@ -357,6 +379,7 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         return value;
     }
 
+    @Override
     public String getLast( )
     {
         final String value = peekLast();
@@ -367,6 +390,7 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         return value;
     }
 
+    @Override
     public String peekFirst( )
     {
         try
@@ -384,6 +408,7 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         }
     }
 
+    @Override
     public String peekLast( )
     {
         try
@@ -401,21 +426,25 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         }
     }
 
+    @Override
     public boolean removeFirstOccurrence( final Object o )
     {
         throw new UnsupportedOperationException();
     }
 
+    @Override
     public boolean removeLastOccurrence( final Object o )
     {
         throw new UnsupportedOperationException();
     }
 
+    @Override
     public void push( final String s )
     {
         this.addFirst( s );
     }
 
+    @Override
     public String pop( )
     {
         final String value = this.removeFirst();
@@ -426,6 +455,7 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         return value;
     }
 
+    @Override
     public Iterator<String> descendingIterator( )
     {
         try
@@ -438,6 +468,7 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         }
     }
 
+    @Override
     public Iterator<String> iterator( )
     {
         try
@@ -450,12 +481,14 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         }
     }
 
+    @Override
     public boolean offer( final String s )
     {
         this.add( s );
         return true;
     }
 
+    @Override
     public String remove( )
     {
         return this.removeFirst();
@@ -473,11 +506,13 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         }
     }
 
+    @Override
     public String element( )
     {
         return this.getFirst();
     }
 
+    @Override
     public String peek( )
     {
         return this.peekFirst();
@@ -506,11 +541,13 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
             queueSizeAtCreate = internalQueue.size();
         }
 
+        @Override
         public boolean hasNext( )
         {
             return position != null;
         }
 
+        @Override
         public String next( )
         {
             if ( position == null )
@@ -655,9 +692,9 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         private InternalQueue( final LocalDB localDB, final LocalDB.DB db, final boolean developerDebug )
                 throws LocalDBException
         {
+            lock.writeLock().lock();
             try
             {
-                lock.writeLock().lock();
                 if ( localDB == null )
                 {
                     throw new NullPointerException( "LocalDB cannot be null" );
@@ -722,9 +759,9 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         public void clear( )
                 throws LocalDBException
         {
+            lock.writeLock().lock();
             try
             {
-                lock.writeLock().lock();
                 localDB.truncate( db );
 
                 headPosition = new Position( "0" );
@@ -746,9 +783,9 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         public int size( )
                 throws LocalDBException
         {
+            lock.readLock().lock();
             try
             {
-                lock.readLock().lock();
                 return internalSize();
             }
             finally
@@ -769,10 +806,9 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
 
         List<String> removeFirst( final int removalCount, final boolean returnValues ) throws LocalDBException
         {
+            lock.writeLock().lock();
             try
             {
-                lock.writeLock().lock();
-
                 debugOutput( "pre removeFirst()" );
 
                 if ( removalCount < 1 )
@@ -813,10 +849,9 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
 
         List<String> removeLast( final int removalCount, final boolean returnValues ) throws LocalDBException
         {
+            lock.writeLock().lock();
             try
             {
-                lock.writeLock().lock();
-
                 debugOutput( "pre removeLast()" );
 
                 if ( removalCount < 1 )
@@ -858,12 +893,11 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         void addFirst( final Collection<String> values )
                 throws LocalDBException
         {
+            lock.writeLock().lock();
             try
             {
-                lock.writeLock().lock();
                 debugOutput( "pre addFirst()" );
-
-                if ( values == null || values.isEmpty() )
+                if ( JavaHelper.isEmpty( values ) )
                 {
                     return;
                 }
@@ -903,11 +937,11 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
 
         void addLast( final Collection<String> values ) throws LocalDBException
         {
+            lock.writeLock().lock();
             try
             {
-                lock.writeLock().lock();
                 debugOutput( "pre addLast()" );
-                if ( values == null || values.isEmpty() )
+                if ( JavaHelper.isEmpty( values ) )
                 {
                     return;
                 }
@@ -947,9 +981,9 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         List<String> getFirst( final int count )
                 throws LocalDBException
         {
+            lock.readLock().lock();
             try
             {
-                lock.readLock().lock();
                 debugOutput( "pre getFirst()" );
 
                 int getCount = count;
@@ -985,10 +1019,9 @@ LocalDBStoredQueue implements Queue<String>, Deque<String>
         List<String> getLast( final int count )
                 throws LocalDBException
         {
+            lock.readLock().lock();
             try
             {
-                lock.readLock().lock();
-
                 debugOutput( "pre getLast()" );
 
                 int getCount = count;

+ 3 - 7
server/src/main/java/password/pwm/util/logging/PwmLogEvent.java

@@ -38,7 +38,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 @Value
-public class PwmLogEvent implements Serializable, Comparable
+public class PwmLogEvent implements Serializable, Comparable<PwmLogEvent>
 {
     private static final int MAX_MESSAGE_LENGTH = 50_000;
 
@@ -141,13 +141,9 @@ public class PwmLogEvent implements Serializable, Comparable
         return output.toString();
     }
 
-    public int compareTo( final Object o )
+    public int compareTo( final PwmLogEvent o )
     {
-        if ( !( o instanceof PwmLogEvent ) )
-        {
-            throw new IllegalArgumentException( "cannot compare with non PwmLogEvent" );
-        }
-        return this.getTimestamp().compareTo( ( ( PwmLogEvent ) o ).getTimestamp() );
+        return this.getTimestamp().compareTo( o.getTimestamp() );
     }
 
     String toEncodedString( )

+ 7 - 7
server/src/main/java/password/pwm/util/logging/PwmLogLevel.java

@@ -36,7 +36,7 @@ public enum PwmLogLevel
         this.log4jLevel = log4jLevel;
     }
 
-    private Level log4jLevel;
+    private final Level log4jLevel;
 
     public Level getLog4jLevel( )
     {
@@ -50,27 +50,27 @@ public enum PwmLogLevel
             return null;
         }
 
-        if ( level == Level.TRACE )
+        if ( Level.TRACE.equals( level ) )
         {
             return TRACE;
         }
-        else if ( level == Level.DEBUG )
+        else if ( Level.DEBUG.equals( level ) )
         {
             return DEBUG;
         }
-        else if ( level == Level.INFO )
+        else if ( Level.INFO.equals( level ) )
         {
             return INFO;
         }
-        else if ( level == Level.WARN )
+        else if ( Level.WARN.equals( level ) )
         {
             return WARN;
         }
-        else if ( level == Level.ERROR )
+        else if ( Level.ERROR.equals( level ) )
         {
             return ERROR;
         }
-        else if ( level == Level.FATAL )
+        else if ( Level.FATAL.equals( level ) )
         {
             return FATAL;
         }

+ 9 - 9
server/src/main/java/password/pwm/util/operations/ActionExecutor.java

@@ -160,11 +160,8 @@ public class ActionExecutor
     {
         String url = webAction.getUrl();
         String body = webAction.getBody();
+
         final Map<String, String> headers = new LinkedHashMap<>();
-        if ( webAction.getHeaders() != null )
-        {
-            headers.putAll( webAction.getHeaders() );
-        }
 
         try
         {
@@ -180,13 +177,16 @@ public class ActionExecutor
                 url = macroMachine.expandMacros( url );
                 body = body == null ? "" : macroMachine.expandMacros( body );
 
-                for ( final Map.Entry<String, String> entry : headers.entrySet() )
+                if ( webAction.getHeaders() != null )
                 {
-                    final String headerName = entry.getKey();
-                    final String headerValue = entry.getValue();
-                    if ( headerValue != null )
+                    for ( final Map.Entry<String, String> entry : webAction.getHeaders().entrySet() )
                     {
-                        headers.put( headerName, macroMachine.expandMacros( headerValue ) );
+                        final String headerName = entry.getKey();
+                        final String headerValue = entry.getValue();
+                        if ( headerValue != null )
+                        {
+                            headers.put( headerName, macroMachine.expandMacros( headerValue ) );
+                        }
                     }
                 }
             }

+ 4 - 4
server/src/main/java/password/pwm/util/password/RandomPasswordGenerator.java

@@ -22,7 +22,7 @@ package password.pwm.util.password;
 
 import com.novell.ldapchai.exception.ImpossiblePasswordPolicyException;
 import lombok.Builder;
-import lombok.Getter;
+import lombok.Value;
 import password.pwm.AppProperty;
 import password.pwm.PwmApplication;
 import password.pwm.bean.SessionLabel;
@@ -622,7 +622,7 @@ public class RandomPasswordGenerator
         return newSeeds.isEmpty() ? DEFAULT_SEED_PHRASES : newSeeds;
     }
 
-    @Getter
+    @Value
     @Builder( toBuilder = true )
     public static class RandomGeneratorConfig
     {
@@ -651,8 +651,8 @@ public class RandomPasswordGenerator
         private int maximumLength = DEFAULT_MAXIMUM_LENGTH;
 
         /**
-         * @param minimumStrength The minimum length desired strength.  The algorithm will attempt to make
-         *         the returned value at least this strong, but it is not guaranteed.
+         * The minimum length desired strength.  The algorithm will attempt to make
+         * the returned value at least this strong, but it is not guaranteed.
          */
         @Builder.Default
         private int minimumStrength = DEFAULT_DESIRED_STRENGTH;