diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 86bb9c72fb..717bb4cdfe 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -46,7 +46,7 @@ PR reviewers will take into account the following aspects when reviewing your PR - code style: keep your code style consistent with the classes you are editing, such as variable names, ordering of methods, etc - scope of the fix: this is a very important factor. Sometimes, the fix should be applied to a broader range of classes, such as a bug that repeats itself in other parts of the code. Other times, the PR solves a bug only partially, because the bug has a broader impact than initially evaluated. - is the proposed fix the best approach for the Jira at hand? -- backwards compatibility: we must prevent any PR that breaks compatibility with previous versions. If the PR| does so, it could still be okay, but this should be clearly documented it will probably be discussed by the project maintainers before being merged +- backwards compatibility: we must prevent any PR that breaks compatibility with previous versions. If the PR does so, it could still be okay, but this should be clearly documented it will probably be discussed by the project maintainers before being merged - security impact: it is critical to evaluate if the PR has any sort of security impact, preventing the addition of exploitable flaws. Your PR will be classified by the reviewer with one or more of the following labels: **bug fix**, **enhancement**, **new feature/API change**, and **dependency upgrade**. @@ -82,7 +82,7 @@ Fork https://github.com/undertow-io/undertow into your GitHub account. ```bash git clone git@github.com:[your username]/undertow.git -cd console +cd undertow ``` ### Add a remote reference to upstream @@ -209,7 +209,7 @@ It is a good practice to create a backup of your original branch in case you end reload your original fix (the GitHub remote origin account containing the PR can serve this purpose, as long as you don't overwrite it with a broken branch). -Once you are satisfied if your commits, run the tests again with `mvn clean verify`. Finally, check the changes your are going +Once you are satisfied with your commits, run the tests again with `mvn clean verify`. Finally, check the changes you are going to push to origin are really okay with: ```bash diff --git a/core/src/main/java/io/undertow/UndertowOptions.java b/core/src/main/java/io/undertow/UndertowOptions.java index 71e50f0ca2..3c76b3ed18 100644 --- a/core/src/main/java/io/undertow/UndertowOptions.java +++ b/core/src/main/java/io/undertow/UndertowOptions.java @@ -474,13 +474,13 @@ public class UndertowOptions { /** - * Configure a read timeout for a web socket, in milliseconds. If its present it will override {@link org.xnio.Options#READ_TIMEOUT}. If the given amount of time elapses without + * Configure a read timeout for a web socket, in milliseconds. If it's present it will override {@link org.xnio.Options#READ_TIMEOUT}. If the given amount of time elapses without * a successful read taking place, the socket's next read will throw a {@link ReadTimeoutException}. */ public static final Option WEB_SOCKETS_READ_TIMEOUT = Option.simple(Options.class, "WEB_SOCKETS_READ_TIMEOUT", Integer.class); /** - * Configure a write timeout for a web socket, in milliseconds. If its present it will override {@link org.xnio.Options#WRITE_TIMEOUT}. If the given amount of time elapses without + * Configure a write timeout for a web socket, in milliseconds. If it's present it will override {@link org.xnio.Options#WRITE_TIMEOUT}. If the given amount of time elapses without * a successful write taking place, the socket's next write will throw a {@link WriteTimeoutException}. */ public static final Option WEB_SOCKETS_WRITE_TIMEOUT = Option.simple(Options.class, "WEB_SOCKETS_WRITE_TIMEOUT", Integer.class); diff --git a/core/src/main/java/io/undertow/protocols/http2/Http2PriorityTree.java b/core/src/main/java/io/undertow/protocols/http2/Http2PriorityTree.java index 63d2624c60..c2c26a3e62 100644 --- a/core/src/main/java/io/undertow/protocols/http2/Http2PriorityTree.java +++ b/core/src/main/java/io/undertow/protocols/http2/Http2PriorityTree.java @@ -52,7 +52,7 @@ public Http2PriorityTree() { } /** - * Resisters a stream, with its dependency and dependent information + * Registers a stream, with its dependency and dependent information * @param streamId The stream id * @param dependency The stream this stream depends on, if no stream is specified this should be zero * @param weighting The weighting. If no weighting is specified this should be 16 diff --git a/core/src/main/java/io/undertow/security/handlers/CachedAuthenticatedSessionHandler.java b/core/src/main/java/io/undertow/security/handlers/CachedAuthenticatedSessionHandler.java index ffc9497d91..7485fdf7d4 100644 --- a/core/src/main/java/io/undertow/security/handlers/CachedAuthenticatedSessionHandler.java +++ b/core/src/main/java/io/undertow/security/handlers/CachedAuthenticatedSessionHandler.java @@ -34,7 +34,7 @@ * {@link HttpHandler} responsible for setting up the {@link AuthenticatedSessionManager} for cached authentications and * registering a {@link NotificationReceiver} to receive the security notifications. *

- * This handler also forces the session to change its session ID on sucessful authentication. + * This handler also forces the session to change its session ID on successful authentication. * * @author Darran Lofthouse */ diff --git a/core/src/main/java/io/undertow/server/handlers/builder/PredicatedHandlersParser.java b/core/src/main/java/io/undertow/server/handlers/builder/PredicatedHandlersParser.java index 7b47be192c..fdd3224410 100644 --- a/core/src/main/java/io/undertow/server/handlers/builder/PredicatedHandlersParser.java +++ b/core/src/main/java/io/undertow/server/handlers/builder/PredicatedHandlersParser.java @@ -361,7 +361,7 @@ static Node parse(final String string, Deque tokens, boolean topLevel) { break; } else if(token.getToken().equals("\n") || token.getToken().equals(";")) { if(token.getToken().equals(";") && tokens.peek()!=null && tokens.peek().getToken().equals(ELSE)) { - // something() -> predicate; ELSE predicate; - dont end processing since its followed by ELSE and its singular block + // something() -> predicate; ELSE predicate; - don't end processing since it's followed by ELSE and it's singular block continue; } else if (token.getToken().equals("\n") && tokens.peek() != null && isOperator(tokens.peek().getToken())) { // predicate diff --git a/core/src/main/java/io/undertow/server/handlers/cache/DirectBufferCache.java b/core/src/main/java/io/undertow/server/handlers/cache/DirectBufferCache.java index e0f59d2ffc..7e11f496c5 100644 --- a/core/src/main/java/io/undertow/server/handlers/cache/DirectBufferCache.java +++ b/core/src/main/java/io/undertow/server/handlers/cache/DirectBufferCache.java @@ -53,7 +53,7 @@ public class DirectBufferCache { */ public static final int MAX_AGE_NO_CACHING = 0; /** - * Mage age -1, entries dont expire + * Max age -1, entries don't expire */ public static final int MAX_AGE_NO_EXPIRY = -1; diff --git a/core/src/main/java/io/undertow/server/handlers/cache/LRUCache.java b/core/src/main/java/io/undertow/server/handlers/cache/LRUCache.java index 1683363526..7ffdb75787 100644 --- a/core/src/main/java/io/undertow/server/handlers/cache/LRUCache.java +++ b/core/src/main/java/io/undertow/server/handlers/cache/LRUCache.java @@ -47,7 +47,7 @@ public class LRUCache { */ public static final int MAX_AGE_NO_CACHING = 0; /** - * Mage age -1, entries dont expire + * Max age -1, entries don't expire */ public static final int MAX_AGE_NO_EXPIRY = -1; diff --git a/core/src/main/java/io/undertow/server/handlers/resource/CachingResourceManager.java b/core/src/main/java/io/undertow/server/handlers/resource/CachingResourceManager.java index bd45bca5ec..d616496899 100644 --- a/core/src/main/java/io/undertow/server/handlers/resource/CachingResourceManager.java +++ b/core/src/main/java/io/undertow/server/handlers/resource/CachingResourceManager.java @@ -36,7 +36,7 @@ public class CachingResourceManager implements ResourceManager { */ public static final int MAX_AGE_NO_CACHING = LRUCache.MAX_AGE_NO_CACHING; /** - * Mage age -1, this force manager to retain entries until underlying resource manager indicate that entries expired/changed + * Max age -1, this forces manager to retain entries until underlying resource manager indicates that entries expired/changed */ public static final int MAX_AGE_NO_EXPIRY = LRUCache.MAX_AGE_NO_EXPIRY; /** diff --git a/core/src/main/java/io/undertow/server/handlers/sse/ServerSentEventConnection.java b/core/src/main/java/io/undertow/server/handlers/sse/ServerSentEventConnection.java index db95eec222..4ac1babbdf 100644 --- a/core/src/main/java/io/undertow/server/handlers/sse/ServerSentEventConnection.java +++ b/core/src/main/java/io/undertow/server/handlers/sse/ServerSentEventConnection.java @@ -494,7 +494,7 @@ public void addToAttachmentList(AttachmentKey> key, T valu public interface EventCallback { /** - * Notification that is called when a message is sucessfully sent + * Notification that is called when a message is successfully sent * * @param connection The connection * @param data The message data diff --git a/core/src/main/java/io/undertow/server/protocol/http2/Http2ReceiveListener.java b/core/src/main/java/io/undertow/server/protocol/http2/Http2ReceiveListener.java index 2ae60d97e4..2049e3f771 100644 --- a/core/src/main/java/io/undertow/server/protocol/http2/Http2ReceiveListener.java +++ b/core/src/main/java/io/undertow/server/protocol/http2/Http2ReceiveListener.java @@ -66,7 +66,7 @@ import static java.nio.charset.StandardCharsets.ISO_8859_1; /** - * The recieve listener for a Http2 connection. + * The receive listener for a Http2 connection. *

* A new instance is created per connection. * diff --git a/core/src/main/java/io/undertow/util/Cookies.java b/core/src/main/java/io/undertow/util/Cookies.java index a892900734..6227c4dd35 100644 --- a/core/src/main/java/io/undertow/util/Cookies.java +++ b/core/src/main/java/io/undertow/util/Cookies.java @@ -470,7 +470,7 @@ public static void assembleCrumbs(final HeaderMap headerMap) { public static void disperseCrumbs(final HeaderMap headerMap) { final HeaderValues cookieValues = headerMap.get(Headers.COOKIE); // NOTE: If cookies are up2standard, thats the only case - // otherwise something is up, dont touch it + // otherwise something is up, don't touch it if (cookieValues != null && cookieValues.size() == 1) { if (cookieValues.getFirst().contains(CRUMB_SEPARATOR)) { final String[] cookieJar = cookieValues.getFirst().split(CRUMB_SEPARATOR); diff --git a/core/src/main/java/io/undertow/websockets/core/protocol/version07/Base64.java b/core/src/main/java/io/undertow/websockets/core/protocol/version07/Base64.java index 44f680f557..61dbe28097 100644 --- a/core/src/main/java/io/undertow/websockets/core/protocol/version07/Base64.java +++ b/core/src/main/java/io/undertow/websockets/core/protocol/version07/Base64.java @@ -429,7 +429,7 @@ private static byte[] encode3to4(byte[] b4, byte[] threeBytes, int numSigBytes, * Encodes up to three bytes of the array source and writes the resulting four Base64 bytes to * destination. The source and destination arrays can be manipulated anywhere along their length by specifying * srcOffset and destOffset. This method does not check to make sure your arrays are large enough to - * accomodate srcOffset + 3 for the source array or destOffset + 4 for the + * accommodate srcOffset + 3 for the source array or destOffset + 4 for the * destination array. The actual number of significant bytes in your array is given by numSigBytes. *

*

diff --git a/servlet/src/main/java/io/undertow/servlet/api/Deployment.java b/servlet/src/main/java/io/undertow/servlet/api/Deployment.java index 6d074ce1e6..918d1e5b81 100644 --- a/servlet/src/main/java/io/undertow/servlet/api/Deployment.java +++ b/servlet/src/main/java/io/undertow/servlet/api/Deployment.java @@ -102,7 +102,7 @@ public interface Deployment { /** * Attempts to add a servlet mapping using {@link jakarta.servlet.ServletRegistration#addMapping(String...)} * - * @return true if the addition was sucessful + * @return true if the addition was successful */ Set tryAddServletMappings(ServletInfo servletInfo, String... urlPatterns); diff --git a/servlet/src/main/java/io/undertow/servlet/handlers/security/CachedAuthenticatedSessionHandler.java b/servlet/src/main/java/io/undertow/servlet/handlers/security/CachedAuthenticatedSessionHandler.java index 3768cbf9bd..daef4569a1 100644 --- a/servlet/src/main/java/io/undertow/servlet/handlers/security/CachedAuthenticatedSessionHandler.java +++ b/servlet/src/main/java/io/undertow/servlet/handlers/security/CachedAuthenticatedSessionHandler.java @@ -37,7 +37,7 @@ * {@link HttpHandler} responsible for setting up the {@link AuthenticatedSessionManager} for cached authentications and * registering a {@link NotificationReceiver} to receive the security notifications. * - * This handler also forces the session to change its session ID on sucessful authentication. + * This handler also forces the session to change its session ID on successful authentication. * * @author Darran Lofthouse */ diff --git a/servlet/src/test/java/io/undertow/servlet/test/session/CrossContextServletBrokenSessionFactoryTestCase.java b/servlet/src/test/java/io/undertow/servlet/test/session/CrossContextServletBrokenSessionFactoryTestCase.java index 6179975a08..76a51ae136 100644 --- a/servlet/src/test/java/io/undertow/servlet/test/session/CrossContextServletBrokenSessionFactoryTestCase.java +++ b/servlet/src/test/java/io/undertow/servlet/test/session/CrossContextServletBrokenSessionFactoryTestCase.java @@ -47,7 +47,7 @@ /** * - * Test that separate servlet deployments use seperate session managers, even if one is broken. + * Test that separate servlet deployments use separate session managers, even if one is broken. * * @author Stuart Douglas */ diff --git a/servlet/src/test/java/io/undertow/servlet/test/session/CrossContextServletSessionTestCase.java b/servlet/src/test/java/io/undertow/servlet/test/session/CrossContextServletSessionTestCase.java index 17d18e5900..37be15b4e8 100644 --- a/servlet/src/test/java/io/undertow/servlet/test/session/CrossContextServletSessionTestCase.java +++ b/servlet/src/test/java/io/undertow/servlet/test/session/CrossContextServletSessionTestCase.java @@ -47,7 +47,7 @@ /** * - * Test that separate servlet deployments use seperate session managers, even in the presence of forwards, + * Test that separate servlet deployments use separate session managers, even in the presence of forwards, * and that sessions created in a forwarded context are accessible to later direct requests * * @author Stuart Douglas diff --git a/servlet/src/test/java/io/undertow/servlet/test/session/CrossContextServletSharedSessionTestCase.java b/servlet/src/test/java/io/undertow/servlet/test/session/CrossContextServletSharedSessionTestCase.java index f51b95face..41e7713422 100644 --- a/servlet/src/test/java/io/undertow/servlet/test/session/CrossContextServletSharedSessionTestCase.java +++ b/servlet/src/test/java/io/undertow/servlet/test/session/CrossContextServletSharedSessionTestCase.java @@ -52,7 +52,7 @@ /** * - * Test that separate servlet deployments use seperate session managers, even in the presence of forwards, + * Test that separate servlet deployments use separate session managers, even in the presence of forwards, * and that sessions created in a forwarded context are accessible to later direct requests * * @author Stuart Douglas diff --git a/websockets-jsr/src/main/java/io/undertow/websockets/jsr/ServerWebSocketContainer.java b/websockets-jsr/src/main/java/io/undertow/websockets/jsr/ServerWebSocketContainer.java index 7bc1e4d273..9617223491 100644 --- a/websockets-jsr/src/main/java/io/undertow/websockets/jsr/ServerWebSocketContainer.java +++ b/websockets-jsr/src/main/java/io/undertow/websockets/jsr/ServerWebSocketContainer.java @@ -590,7 +590,7 @@ public Set getInstalledExtensions() { * Runs a web socket invocation, setting up the threads and dispatching a thread pool *

* Unfortunately we need to dispatch to a thread pool, because there is a good chance that the endpoint - * will use blocking IO methods. We suspend recieves while this is in progress, to make sure that we do not have multiple + * will use blocking IO methods. We suspend receives while this is in progress, to make sure that we do not have multiple * methods invoked at once. *

* diff --git a/websockets-jsr/src/main/java/io/undertow/websockets/jsr/UndertowSession.java b/websockets-jsr/src/main/java/io/undertow/websockets/jsr/UndertowSession.java index c9efce9a7d..5114b68205 100644 --- a/websockets-jsr/src/main/java/io/undertow/websockets/jsr/UndertowSession.java +++ b/websockets-jsr/src/main/java/io/undertow/websockets/jsr/UndertowSession.java @@ -141,7 +141,7 @@ public synchronized void removeMessageHandler(MessageHandler messageHandler) { } /** - * sets the recieve listener This should only be used for annotated endpoints. + * sets the receive listener This should only be used for annotated endpoints. * * @param handler The handler */ @@ -204,7 +204,7 @@ public void closeInternal(CloseReason closeReason) throws IOException { try { try { if (!webSocketChannel.isCloseFrameReceived() && !webSocketChannel.isCloseFrameSent()) { - //if we have already recieved a close frame then the close frame handler + //if we have already received a close frame then the close frame handler //will deal with sending back the reason message if (closeReason == null || closeReason.getCloseCode().getCode() == CloseReason.CloseCodes.NO_STATUS_CODE.getCode()) { webSocketChannel.sendClose();