diff --git a/src/main/java/org/kiwiproject/config/SecureEndpointsConfiguration.java b/src/main/java/org/kiwiproject/config/SecureEndpointsConfiguration.java index 76537ffa..1de1fa95 100644 --- a/src/main/java/org/kiwiproject/config/SecureEndpointsConfiguration.java +++ b/src/main/java/org/kiwiproject/config/SecureEndpointsConfiguration.java @@ -15,7 +15,7 @@ /** * Configuration for secure REST endpoints, including the configuration from an {@link SSLContextConfiguration} * as well as adding a collection of {@link EndpointConfiguration} instances. Supports programmatic creation - * using a builder. Also supports construction from external configuration, e.g. from a YAML configuration file, using + * using a builder. Also supports construction from external configuration, e.g., from a YAML configuration file, using * the no-args constructor and setter methods. *

* As this is a configuration class that supports population from external configuration, it is mutable. @@ -30,7 +30,7 @@ public class SecureEndpointsConfiguration extends SSLContextConfiguration { private List endpoints; /** - * Create instance with empty collection of endpoints. + * Create instance with an empty collection of endpoints. */ public SecureEndpointsConfiguration() { this.endpoints = new ArrayList<>(); diff --git a/src/main/java/org/kiwiproject/jdbc/SqlOrder.java b/src/main/java/org/kiwiproject/jdbc/SqlOrder.java index df4fbfed..a9973934 100644 --- a/src/main/java/org/kiwiproject/jdbc/SqlOrder.java +++ b/src/main/java/org/kiwiproject/jdbc/SqlOrder.java @@ -9,7 +9,7 @@ /** * Simple enum that represents the values for SQL {@code ORDER BY} clauses. *

- * This is useful in building queries, for example when using JDBI and the SQL objects API you might + * This is useful in building queries, for example, when using JDBI and the SQL objects API you might * need to add dynamic ordering based on user input but want to ensure no SQL injection attack is possible. * So you would accept user input and then use {@link #from(String)} to get a {@link SqlOrder} instance. * Then, you could use it in a JDBI {@code SqlQuery} annotation as one example. @@ -23,7 +23,7 @@ public enum SqlOrder { * * @param value the value to convert from * @return the SqlOrder enum corresponding to the given value - * @throws IllegalArgumentException if an invalid value is provided that does not map to a SqlOrder enum constant + * @throws IllegalArgumentException if an invalid value is provided but does not map to a SqlOrder enum constant */ public static SqlOrder from(String value) { var trimmedValue = Optional.ofNullable(value).map(String::trim).orElse(""); @@ -61,7 +61,7 @@ public List searchWith(Supplier> ascSearch, Supplier> des /** * Return a string that can be used directly in a SQL {@code ORDER BY} clause. * - * @return a string that can be used in a SQL query + * @return a string that can be used in an SQL query */ public String toSql() { return name(); diff --git a/src/main/java/org/kiwiproject/jsch/SftpConfig.java b/src/main/java/org/kiwiproject/jsch/SftpConfig.java index b10d2ac0..79fbb0a7 100644 --- a/src/main/java/org/kiwiproject/jsch/SftpConfig.java +++ b/src/main/java/org/kiwiproject/jsch/SftpConfig.java @@ -96,7 +96,7 @@ public class SftpConfig { private String knownHostsFile; /** - * Provides option to disable strict host key checking, equivalent to the + * Provides an option to disable strict host key checking, equivalent to the * {@code -o StrictHostKeyChecking=[yes|no]} option. *

* The default is false. See the {@code ssh_info} man page for more details. @@ -120,7 +120,7 @@ public class SftpConfig { * @param host the remote host * @param user the SFTP username * @param password the SFTP password - * @param privateKeyFilePath path to private key file + * @param privateKeyFilePath path to the private key file * @param preferredAuthentications comma-separated list of authentications to attempt * @param remoteBasePath root directory of the remote SFTP location * @param errorPath local directory to write out any errors if SFTP fails @@ -129,8 +129,8 @@ public class SftpConfig { * @param timeout the SFTP connection timeout * @implNote This is intentionally not using Lombok because using {@link lombok.AllArgsConstructor} together * with @{@link lombok.Builder} results in an all-args constructor that does not respect {@link lombok.Builder.Default}. - * As a result we need to handle the defaults ourselves. This is intended to be used during deserialization - * from an external configuration file (e.g. a Dropwizard YAML configuration file, or from JSON). Prefer the + * As a result, we need to handle the defaults ourselves. This is intended to be used during deserialization + * from an external configuration file (e.g., a Dropwizard YAML configuration file, or from JSON). Prefer the * builder when constructing programmatically. */ // Suppress Sonar's "Methods should not have too many parameters". We need this for the builder and for diff --git a/src/main/java/org/kiwiproject/jsch/SftpConnector.java b/src/main/java/org/kiwiproject/jsch/SftpConnector.java index e57ca61b..aeff6dc1 100644 --- a/src/main/java/org/kiwiproject/jsch/SftpConnector.java +++ b/src/main/java/org/kiwiproject/jsch/SftpConnector.java @@ -62,7 +62,7 @@ public SftpConnector(JSch jsch, SftpConfig config) { * * @param config The configuration used for setting up the connection * @return The initialized and opened sftp connection - * @apiNote This is a convenience method to not have to call connect after initialization. + * @apiNote This is a convenience method to not have to call {@code connect} after initialization. */ public static SftpConnector setupAndOpenConnection(SftpConfig config) { return setupAndOpenConnection(new JSch(), config); diff --git a/src/main/java/org/kiwiproject/jsch/SftpTransfers.java b/src/main/java/org/kiwiproject/jsch/SftpTransfers.java index 3755bbe6..949464f5 100644 --- a/src/main/java/org/kiwiproject/jsch/SftpTransfers.java +++ b/src/main/java/org/kiwiproject/jsch/SftpTransfers.java @@ -191,7 +191,7 @@ public String getFileContent(Path remotePath, String remoteFilename) { /** * Gets a file off of a remote server with the given path and given filename and returns an {@link InputStream}. This - * is useful if the remote file is binary and not a text based file. + * is useful if the remote file is binary and not a text-based file. *

* Note: The caller of this method is responsible for closing the stream. * diff --git a/src/main/java/org/kiwiproject/json/RuntimeJsonException.java b/src/main/java/org/kiwiproject/json/RuntimeJsonException.java index a9f2f4c1..508666ce 100644 --- a/src/main/java/org/kiwiproject/json/RuntimeJsonException.java +++ b/src/main/java/org/kiwiproject/json/RuntimeJsonException.java @@ -6,7 +6,7 @@ public class RuntimeJsonException extends RuntimeException { /** - * Create instance with given cause. + * Create an instance with the given cause. * * @param cause the cause */ @@ -15,7 +15,7 @@ public RuntimeJsonException(Throwable cause) { } /** - * Create instance with given message and cause. + * Create an instance with the given message and cause. * * @param message the message * @param cause the cause diff --git a/src/main/java/org/kiwiproject/net/SimpleHostAndPort.java b/src/main/java/org/kiwiproject/net/SimpleHostAndPort.java index 1c03872a..1628b217 100644 --- a/src/main/java/org/kiwiproject/net/SimpleHostAndPort.java +++ b/src/main/java/org/kiwiproject/net/SimpleHostAndPort.java @@ -14,7 +14,7 @@ * (Just go look at the code in {@link com.google.common.net.HostAndPort#fromString(String)} if you don't believe me.) * Because it is much simpler, it also only handles a very specific host/port format, which is {@code host:port}. *

- * It also does not attempt to validate anything about the host or port, e.g. it will happily accept a negative port + * It also does not attempt to validate anything about the host or port, e.g., it will happily accept a negative port * value or a one-character long host name. */ @EqualsAndHashCode @@ -33,7 +33,7 @@ public class SimpleHostAndPort { *

* No validation is performed on the default values. * - * @param hostPortString a string containing host and port, e.g. acme.com:8001 + * @param hostPortString a string containing host and port, e.g., acme.com:8001 * @param defaultHost a default host if the host/port string is blank * @param defaultPort a default port if the host/port string is blank * @return a new SimpleHostAndPort instance @@ -49,7 +49,7 @@ public static SimpleHostAndPort from(String hostPortString, String defaultHost, /** * Parse {@code hostPortString} assuming format {@code host:port} * - * @param hostPortString a string containing host and port, e.g. foo.com:9000 + * @param hostPortString a string containing host and port, e.g., foo.com:9000 * @return a new SimpleHostAndPort instance * @throws IllegalStateException if not in the expected format * @throws IllegalArgumentException if hostPortString is blank or port is not a valid number diff --git a/src/main/java/org/kiwiproject/reflect/RuntimeReflectionException.java b/src/main/java/org/kiwiproject/reflect/RuntimeReflectionException.java index 4a72e9b5..b19c5dd9 100644 --- a/src/main/java/org/kiwiproject/reflect/RuntimeReflectionException.java +++ b/src/main/java/org/kiwiproject/reflect/RuntimeReflectionException.java @@ -4,7 +4,7 @@ * A custom runtime exception for wrapping (checked or unchecked) exceptions related to reflection. *

* There are no restrictions on the wrapped {@link Throwable}, but the intent is that they should be - * some checked or unchecked exception that was thrown by a reflective operation, e.g. reflectively + * some checked or unchecked exception that was thrown by a reflective operation, e.g., reflectively * finding or invoking a method, or accessing a field. */ @SuppressWarnings("unused") diff --git a/src/main/java/org/kiwiproject/retry/RetryResult.java b/src/main/java/org/kiwiproject/retry/RetryResult.java index b700c741..55210eb0 100644 --- a/src/main/java/org/kiwiproject/retry/RetryResult.java +++ b/src/main/java/org/kiwiproject/retry/RetryResult.java @@ -16,16 +16,16 @@ /** * Defines a result of one or more attempts to get some type of object. The list of errors should reflect the order - * in which errors occurred, e.g. the first error should be the error for the first attempt, second error should be + * in which errors occurred, e.g., the first error should be the error for the first attempt, the second error should be * the error for the second attempt, etc. *

- * A unique identifier is automatically assigned to new {@link RetryResult} instances for easy identification, e.g. + * A unique identifier is automatically assigned to new {@link RetryResult} instances for easy identification, e.g., * when logging retry exceptions. *

- * Note that there is nothing precluding a {@link RetryResult} from representing a failure but not actually have any + * Note that there is nothing precluding a {@link RetryResult} from representing a failure but not have any * errors. This could happen, for example, if retry code executes a {@link java.util.function.Supplier} * and that supplier is implemented to catch all exceptions and return {@code null} to force a retry. We generally - * recommend to implement Suppliers to throw exceptions when errors occur. They will need to be subclasses of + * recommend implementing Suppliers to throw exceptions when errors occur. They will need to be subclasses of * {@link RuntimeException} since {@link java.util.function.Supplier} doesn't permit checked exceptions, plus we * generally prefer unchecked exceptions. * @@ -143,7 +143,7 @@ public int getNumErrors() { * Assumes there is at least one error, and returns the last one that was thrown regardless of the number * of attempts. *

- * You should check if there are any errors, e.g. using {@link #hasAnyErrors()}, before calling this method. + * You should check if there are any errors, e.g., using {@link #hasAnyErrors()}, before calling this method. * Alternatively consider using {@link #getLastErrorIfPresent}. * * @return the most recent exception that occurred diff --git a/src/main/java/org/kiwiproject/retry/RetryResultLogger.java b/src/main/java/org/kiwiproject/retry/RetryResultLogger.java index b306aeae..271ccc28 100644 --- a/src/main/java/org/kiwiproject/retry/RetryResultLogger.java +++ b/src/main/java/org/kiwiproject/retry/RetryResultLogger.java @@ -25,8 +25,8 @@ public class RetryResultLogger { * * @param result the result * @param logger the SLF4J logger to use - * @param actionDescriptionSupplier a {@link Supplier} that provides a description of the action that was attempted - * for example "Create new order #12345" or "Update order #456" + * @param actionDescriptionSupplier a {@link Supplier} that provides a description of the action that was attempted, + * for example, "Create new order #12345" or "Update order #456" * @param the type held in the result * @see #logSummary(RetryResult, Logger, String) */ @@ -46,8 +46,8 @@ public static void logSummaryIfFailed(RetryResult result, * * @param result the result * @param logger the SLF4J logger to use - * @param actionDescriptionSupplier a {@link Supplier} that provides a description of the action that was attempted - * for example "Create new order #12345" or "Update order #456" + * @param actionDescriptionSupplier a {@link Supplier} that provides a description of the action that was attempted, + * for example, "Create new order #12345" or "Update order #456" * @param the type held in the result */ public static void logSummaryIfHasErrorsOrMultipleAttempts(RetryResult result, @@ -71,7 +71,7 @@ private static void logSummaryWithDescriptionSupplier(RetryResult result, /** * Logs a high-level summary of the result. The log level is dependent on whether the result was successful - * or not, and whether there were any errors (e.g. a result was successful but took more than one attempt). + * or not, and whether there were any errors (e.g., a result was successful but took more than one attempt). *

* The log levels are: *

@@ -83,8 +83,8 @@ private static void logSummaryWithDescriptionSupplier(RetryResult result, * * @param result the result * @param logger the SLF4J logger to use - * @param actionDescription a {@link Supplier} that provides a description of the action that was attempted - * for example "Create new order #12345" or "Update order #456" + * @param actionDescription a {@link Supplier} that provides a description of the action that was attempted, + * for example, "Create new order #12345" or "Update order #456" * @param the type held in the result */ public static void logSummary(RetryResult result, Logger logger, String actionDescription) { diff --git a/src/main/java/org/kiwiproject/retry/SimpleRetries.java b/src/main/java/org/kiwiproject/retry/SimpleRetries.java index c52727fe..4cee84e2 100644 --- a/src/main/java/org/kiwiproject/retry/SimpleRetries.java +++ b/src/main/java/org/kiwiproject/retry/SimpleRetries.java @@ -45,9 +45,9 @@ public class SimpleRetries { * @param maxAttempts the maximum number of attempts to make before giving up * @param retryDelay constant delay time between attempts * @param retryDelayUnit delay time unit between attempts - * @param supplier on success return the object; return {@code null} or throw exception if attempt failed + * @param supplier on success return the object; return {@code null} or throw exception if the attempt failed * @param the type of object - * @return an Optional which either contains a value, or is empty if all attempts failed + * @return an Optional which either contains a value or is empty if all attempts failed */ public static Optional tryGetObject(int maxAttempts, long retryDelay, TimeUnit retryDelayUnit, @@ -63,9 +63,9 @@ public static Optional tryGetObject(int maxAttempts, * @param retryDelay constant delay time between attempts * @param retryDelayUnit delay time unit between attempts * @param environment the {@link KiwiEnvironment} to use when sleeping between attempts - * @param supplier on success return the object; return {@code null} or throw exception if attempt failed + * @param supplier on success return the object; return {@code null} or throw exception if the attempt failed * @param the type of object - * @return an Optional which either contains a value, or is empty if all attempts failed + * @return an Optional which either contains a value or is empty if all attempts failed */ public static Optional tryGetObject(int maxAttempts, long retryDelay, TimeUnit retryDelayUnit, @@ -82,9 +82,9 @@ public static Optional tryGetObject(int maxAttempts, * @param retryDelay constant delay time between attempts * @param retryDelayUnit delay time unit between attempts * @param type the type of object we are attempting to return, used when logging attempts - * @param supplier on success return the object; return {@code null} or throw exception if attempt failed + * @param supplier on success return the object; return {@code null} or throw exception if the attempt failed * @param the type of object - * @return an Optional which either contains a value, or is empty if all attempts failed + * @return an Optional which either contains a value or is empty if all attempts failed */ public static Optional tryGetObject(int maxAttempts, long retryDelay, TimeUnit retryDelayUnit, @@ -102,9 +102,9 @@ public static Optional tryGetObject(int maxAttempts, * @param retryDelayUnit delay time unit between attempts * @param environment the {@link KiwiEnvironment} to use when sleeping between attempts * @param type the type of object we are attempting to return, used when logging attempts - * @param supplier on success return the object; return {@code null} or throw exception if attempt failed + * @param supplier on success return the object; return {@code null} or throw exception if the attempt failed * @param the type of object - * @return an Optional which either contains a value, or is empty if all attempts failed + * @return an Optional which either contains a value or is empty if all attempts failed */ public static Optional tryGetObject(int maxAttempts, long retryDelay, TimeUnit retryDelayUnit, @@ -124,9 +124,9 @@ public static Optional tryGetObject(int maxAttempts, * @param environment the {@link KiwiEnvironment} to use when sleeping between attempts * @param type the type of object we are attempting to return, used when logging attempts * @param level the SLF4J log {@link Level} at which to log retries - * @param supplier on success return the object; return {@code null} or throw exception if attempt failed + * @param supplier on success return the object; return {@code null} or throw exception if the attempt failed * @param the type of object - * @return an Optional which either contains a value, or is empty if all attempts failed + * @return an Optional which either contains a value or is empty if all attempts failed */ public static Optional tryGetObject(int maxAttempts, long retryDelay, TimeUnit retryDelayUnit, @@ -184,7 +184,7 @@ private static T safeGetOrNull(int currentAttempt, * @param maxAttempts the maximum number of attempts to make before giving up * @param retryDelay constant delay time between attempts * @param retryDelayUnit delay time unit between attempts - * @param supplier on success return the object; return {@code null} or throw exception if attempt failed + * @param supplier on success return the object; return {@code null} or throw exception if the attempt failed * @param the type of object * @return a {@link RetryResult} */ @@ -202,7 +202,7 @@ public static RetryResult tryGetObjectCollectingErrors(int maxAttempts, * @param retryDelay constant delay time between attempts * @param retryDelayUnit delay time unit between attempts * @param type the type of object we are attempting to return, used when logging attempts - * @param supplier on success return the object; return {@code null} or throw exception if attempt failed + * @param supplier on success return the object; return {@code null} or throw exception if the attempt failed * @param the type of object * @return a {@link RetryResult} */ @@ -222,7 +222,7 @@ public static RetryResult tryGetObjectCollectingErrors(int maxAttempts, * @param retryDelayUnit delay time unit between attempts * @param environment the {@link KiwiEnvironment} to use when sleeping between attempts * @param type the type of object we are attempting to return, used when logging attempts - * @param supplier on success return the object; return {@code null} or throw exception if attempt failed + * @param supplier on success return the object; return {@code null} or throw exception if an attempt failed * @param the type of object * @return a {@link RetryResult} */ @@ -243,7 +243,7 @@ public static RetryResult tryGetObjectCollectingErrors(int maxAttempts, * @param retryDelayUnit delay time unit between attempts * @param environment the {@link KiwiEnvironment} to use when sleeping between attempts * @param type the type of object we are attempting to return, used when logging attempts - * @param supplier on success return the object; return {@code null} or throw exception if attempt failed + * @param supplier on success return the object; return {@code null} or throw exception if the attempt failed * @param the type of object * @return a {@link RetryResult} */ @@ -265,7 +265,7 @@ public static RetryResult tryGetObjectCollectingErrors(int maxAttempts, * @param environment the {@link KiwiEnvironment} to use when sleeping between attempts * @param type the type of object we are attempting to return, used when logging attempts * @param level the SLF4J log {@link Level} at which to log retries - * @param supplier on success return the object; return {@code null} or throw exception if attempt failed + * @param supplier on success return the object; return {@code null} or throw exception if the attempt failed * @param the type of object * @return a {@link RetryResult} */ diff --git a/src/main/java/org/kiwiproject/retry/SimpleRetryer.java b/src/main/java/org/kiwiproject/retry/SimpleRetryer.java index 2ed9a98f..8f0f12dc 100644 --- a/src/main/java/org/kiwiproject/retry/SimpleRetryer.java +++ b/src/main/java/org/kiwiproject/retry/SimpleRetryer.java @@ -68,7 +68,7 @@ public class SimpleRetryer { public static final int DEFAULT_MAX_ATTEMPTS = 3; /** - * Default retry delay time. This is a static value, i.e. there is no fancy exponential or linear backoff. + * Default retry delay time. This is a static value, i.e., there is no fancy exponential or linear backoff. */ public static final long DEFAULT_RETRY_DELAY_TIME = 50; @@ -132,9 +132,9 @@ public class SimpleRetryer { /** * Try to get an object. * - * @param supplier on success return the object; return {@code null} or throw exception if attempt failed + * @param supplier on success return the object; return {@code null} or throw exception if the attempt failed * @param the type of object - * @return an Optional which either contains a value, or is empty if all attempts failed + * @return an Optional which either contains a value or is empty if all attempts failed */ public Optional tryGetObject(Supplier supplier) { return tryGetObject(commonType, supplier); @@ -144,9 +144,9 @@ public Optional tryGetObject(Supplier supplier) { * Try to get an object. * * @param type the type of object to return, used only in logging messages - * @param supplier on success return the object; return {@code null} or throw exception if attempt failed + * @param supplier on success return the object; return {@code null} or throw exception if the attempt failed * @param the type of object - * @return an Optional which either contains a value, or is empty if all attempts failed + * @return an Optional which either contains a value or is empty if all attempts failed */ public Optional tryGetObject(Class type, Supplier supplier) { return tryGetObject(type.getSimpleName(), supplier); @@ -156,9 +156,9 @@ public Optional tryGetObject(Class type, Supplier supplier) { * Try to get an object. * * @param type the type of object to return, used only in logging messages - * @param supplier on success return the object; return {@code null} or throw exception if attempt failed + * @param supplier on success return the object; return {@code null} or throw exception if the attempt failed * @param the type of object - * @return an Optional which either contains a value, or is empty if all attempts failed + * @return an Optional which either contains a value or is empty if all attempts failed */ public Optional tryGetObject(String type, Supplier supplier) { return SimpleRetries.tryGetObject( @@ -173,7 +173,7 @@ public Optional tryGetObject(String type, Supplier supplier) { /** * Try to get an object. * - * @param supplier on success return the object; return {@code null} or throw exception if attempt failed + * @param supplier on success return the object; return {@code null} or throw exception if the attempt failed * @param the type of object * @return a {@link RetryResult} */ @@ -185,7 +185,7 @@ public RetryResult tryGetObjectCollectingErrors(Supplier supplier) { * Try to get an object. * * @param type the type of object to return, used only in logging messages - * @param supplier on success return the object; return {@code null} or throw exception if attempt failed + * @param supplier on success return the object; return {@code null} or throw exception if the attempt failed * @param the type of object * @return a {@link RetryResult} */ @@ -197,7 +197,7 @@ public RetryResult tryGetObjectCollectingErrors(Class type, Supplier the type of object * @return a {@link RetryResult} */ diff --git a/src/main/java/org/kiwiproject/retry/SimpleRetryerConfig.java b/src/main/java/org/kiwiproject/retry/SimpleRetryerConfig.java index 3703d6dd..b0bedc54 100644 --- a/src/main/java/org/kiwiproject/retry/SimpleRetryerConfig.java +++ b/src/main/java/org/kiwiproject/retry/SimpleRetryerConfig.java @@ -11,7 +11,7 @@ /** * Configuration class that can be used to configure {@link SimpleRetryer} instances. This is - * intended for usage with external configurations, e.g. a YAML configuration file, that will + * intended for usage with external configurations, e.g., a YAML configuration file, that will * be validated once instantiated. You can construct {@link SimpleRetryer} instances directly * from this instance using {@link #newRetryer}. *

diff --git a/src/main/java/org/kiwiproject/search/Sorted.java b/src/main/java/org/kiwiproject/search/Sorted.java index 3a1a00c1..d6879e24 100644 --- a/src/main/java/org/kiwiproject/search/Sorted.java +++ b/src/main/java/org/kiwiproject/search/Sorted.java @@ -6,8 +6,8 @@ public interface Sorted { /** - * Defines a general sort direction, which will usually by something like "asc" or "desc" but can be customized - * however an application likes. + * Defines a general sort direction, which will usually by something like "asc" or "desc" but it can be customized + * as an application likes. * * @return the sort direction */ diff --git a/src/main/java/org/kiwiproject/security/SimpleSSLContextFactory.java b/src/main/java/org/kiwiproject/security/SimpleSSLContextFactory.java index 3906b9ef..0be31046 100644 --- a/src/main/java/org/kiwiproject/security/SimpleSSLContextFactory.java +++ b/src/main/java/org/kiwiproject/security/SimpleSSLContextFactory.java @@ -50,7 +50,7 @@ public class SimpleSSLContextFactory { private SSLContext sslContext; /** - * This is not strictly needed when creating {@link SSLContext}s. It is here only in case this factory + * This is not strictly necessary when creating {@link SSLContext}s. It is here only in case this factory * will be supplied to other code that makes HTTPS connections and needs to create {@link SSLContext} * instances AND also needs to know whether it should perform hostname verification when making HTTPS * requests. @@ -59,7 +59,7 @@ public class SimpleSSLContextFactory { private final boolean verifyHostname; /** - * This is not strictly needed when creating {@link SSLContext}s. It is here only in case this factory + * This is not strictly necessary when creating {@link SSLContext}s. It is here only in case this factory * will be supplied to other code that makes HTTPS connections and needs to create {@link SSLContext} * instances AND also needs to know whether it should perform SNI host checking. */ @@ -344,7 +344,7 @@ public static Builder builder() { * Create/get a {@link SSLContext} instance for the key and trust store properties and protocol that this * {@link SimpleSSLContextFactory} instance was built with. * - * @return a new {@link SSLContext} instance when first called; all subsequent calls return the same cached instance + * @return a new {@link SSLContext} instance when first called; all later calls return the same cached instance * @implNote This is intended to be called infrequently, e.g., once when a service/app starts. * It is internally synchronized to ensure thread-safety when creating the {@link SSLContext}. */ @@ -362,7 +362,7 @@ public SSLContext getSslContext() { * Callers are responsible for securely handling the result, and not unnecessarily exposing it. * * @return a map containing the configuration of this factory - * @apiNote This is publicly exposed, but should not generally be needed except in tests, and perhaps debugging. + * @apiNote This is publicly exposed but should not generally be necessary except in tests, and perhaps debugging. * @implNote Uses {@link KiwiMaps#newHashMap(Object...)} because some values may be {@code null}, e.g., the key * store path, and wraps that using {@link Collections#unmodifiableMap(Map)} to prevent modification of the * returned map. diff --git a/src/main/java/org/kiwiproject/spring/context/SpringContextBuilder.java b/src/main/java/org/kiwiproject/spring/context/SpringContextBuilder.java index 0419e7e2..f35aa210 100644 --- a/src/main/java/org/kiwiproject/spring/context/SpringContextBuilder.java +++ b/src/main/java/org/kiwiproject/spring/context/SpringContextBuilder.java @@ -15,7 +15,7 @@ /** * Builder class for easily constructing Spring ApplicationContext instances using either XML or annotation-based * configuration. The generated ApplicationContext instance is built by creating a parent context, which contains - * registered singleton beans, and then a child context. This allows specific singletons, e.g. a data source or a + * registered singleton beans, and then a child context. This allows specific singletons, e.g., a data source or a * Dropwizard configuration object, to be accessible from the child context. The parent context beans can be referenced * in either XML or annotation configurations. *

@@ -79,7 +79,7 @@ private void checkConfigLocationsIsEmpty() { } /** - * Add a single Spring XML configuration location. + * Add a Spring XML configuration location. * * @param location the XML config location, e.g. {@code applicationContext.xml} * @return the builder instance diff --git a/src/test/java/org/kiwiproject/config/SecureEndpointsConfigurationTest.java b/src/test/java/org/kiwiproject/config/SecureEndpointsConfigurationTest.java index 9191ad0c..4ffb2055 100644 --- a/src/test/java/org/kiwiproject/config/SecureEndpointsConfigurationTest.java +++ b/src/test/java/org/kiwiproject/config/SecureEndpointsConfigurationTest.java @@ -68,7 +68,7 @@ private SecureEndpointsConfiguration loadFromYaml(String filename) { } } - @SuppressWarnings("WeakerAccess") // must be public for Yaml to instantiate + @SuppressWarnings("WeakerAccess") // must be public for YAML to instantiate @Getter @Setter public static class SampleAppConfig {