Skip to content

Commit

Permalink
Merge pull request #1655 from baranowb/UNDERTOW-2431_max
Browse files Browse the repository at this point in the history
[UNDERTOW-2431] Bump jboss-parent to 46, checkstyle and slightly upda…
  • Loading branch information
baranowb authored Nov 25, 2024
2 parents d4b3aba + 31c5150 commit 6ed8ce8
Show file tree
Hide file tree
Showing 78 changed files with 173 additions and 174 deletions.
18 changes: 9 additions & 9 deletions core/src/main/java/io/undertow/UndertowLogger.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public interface UndertowLogger extends BasicLogger {

// @LogMessage(level = INFO)
// @Message(id = 5002, value = "Exception reading file %s: %s")
// void exceptionReadingFile(final Path file, final IOException e);
// void exceptionReadingFile(Path file, IOException e);

@LogMessage(level = ERROR)
@Message(id = 5003, value = "IOException reading from channel")
Expand All @@ -101,15 +101,15 @@ public interface UndertowLogger extends BasicLogger {

@LogMessage(level = DEBUG)
@Message(id = 5008, value = "An invalid token '%s' with value '%s' has been received.")
void invalidTokenReceived(final String tokenName, final String tokenValue);
void invalidTokenReceived(String tokenName, String tokenValue);

@LogMessage(level = DEBUG)
@Message(id = 5009, value = "A mandatory token %s is missing from the request.")
void missingAuthorizationToken(final String tokenName);
void missingAuthorizationToken(String tokenName);

@LogMessage(level = DEBUG)
@Message(id = 5010, value = "Verification of authentication tokens for user '%s' has failed using mechanism '%s'.")
void authenticationFailed(final String userName, final String mechanism);
void authenticationFailed(String userName, String mechanism);

@LogMessage(level = ERROR)
@Message(id = 5011, value = "Ignoring AJP request with prefix %s")
Expand Down Expand Up @@ -443,23 +443,23 @@ void nodeConfigCreated(URI connectionURI, String balancer, String domain, String

@LogMessage(level = DEBUG)
@Message(id = 5096, value = "Authentication failed for digest header %s in %s")
void authenticationFailedFor(final String header, final HttpServerExchange exchange, final @Cause Exception e);
void authenticationFailedFor(String header, HttpServerExchange exchange, @Cause Exception e);

@LogMessage(level = DEBUG)
@Message(id = 5097, value = "Failed to obtain subject for %s")
void failedToObtainSubject(final HttpServerExchange exchange, final @Cause GeneralSecurityException e);
void failedToObtainSubject(HttpServerExchange exchange, @Cause GeneralSecurityException e);

@LogMessage(level = DEBUG)
@Message(id = 5098, value = "GSSAPI negotiation failed for %s")
void failedToNegotiateAtGSSAPI(final HttpServerExchange exchange, final @Cause Throwable e);
void failedToNegotiateAtGSSAPI(HttpServerExchange exchange, @Cause Throwable e);

@LogMessage(level = WARN)
@Message(id = 5099, value = "Failed to create SSO for session '%s'")
void failedToCreateSSOForSession(final String sessionId);
void failedToCreateSSOForSession(String sessionId);

@LogMessage(level = DEBUG)
@Message(id = 5100, value = "Failed to list paths for '%s'")
void failedToListPathsForFile(final Path f);
void failedToListPathsForFile(Path f);

@LogMessage(level = DEBUG)
@Message(id = 5101, value = "No source to list resources from")
Expand Down
12 changes: 6 additions & 6 deletions core/src/main/java/io/undertow/UndertowMessages.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public interface UndertowMessages {
IllegalStateException sessionManagerNotFound();

@Message(id = 13, value = "Argument %s cannot be null")
IllegalArgumentException argumentCannotBeNull(final String argument);
IllegalArgumentException argumentCannotBeNull(String argument);

// @Message(id = 14, value = "close() called with data still to be flushed. Please call shutdownWrites() and then call flush() until it returns true before calling close()")
// IOException closeCalledWithDataStillToBeFlushed();
Expand All @@ -112,13 +112,13 @@ public interface UndertowMessages {
IllegalArgumentException hashAlgorithmNotFound(String algorithmName);

@Message(id = 23, value = "An invalid Base64 token has been received.")
IllegalArgumentException invalidBase64Token(@Cause final IOException cause);
IllegalArgumentException invalidBase64Token(@Cause IOException cause);

@Message(id = 24, value = "An invalidly formatted nonce has been received.")
IllegalArgumentException invalidNonceReceived();

@Message(id = 25, value = "Unexpected token '%s' within header.")
IllegalArgumentException unexpectedTokenInHeader(final String name);
IllegalArgumentException unexpectedTokenInHeader(String name);

@Message(id = 26, value = "Invalid header received.")
IllegalArgumentException invalidHeader();
Expand All @@ -133,10 +133,10 @@ public interface UndertowMessages {
IOException chunkedChannelClosedMidChunk();

@Message(id = 30, value = "User %s successfully authenticated.")
String userAuthenticated(final String userName);
String userAuthenticated(String userName);

@Message(id = 31, value = "User %s has logged out.")
String userLoggedOut(final String userName);
String userLoggedOut(String userName);
//
// @Message(id = 33, value = "Authentication type %s cannot be combined with %s")
// IllegalStateException authTypeCannotBeCombined(String type, String existing);
Expand All @@ -154,7 +154,7 @@ public interface UndertowMessages {
RuntimeException failedToParsePath();

@Message(id = 38, value = "Authentication failed, requested user name '%s'")
String authenticationFailed(final String userName);
String authenticationFailed(String userName);

@Message(id = 39, value = "Too many query parameters, cannot have more than %s query parameters")
BadRequestException tooManyQueryParameters(int noParams);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ public interface ExchangeAttribute {
* @param exchange The exchange
* @return The attribute
*/
String readAttribute(final HttpServerExchange exchange);
String readAttribute(HttpServerExchange exchange);

/**
* Sets a new value for the attribute. Not all attributes are writable.
* @param exchange The exchange
* @param newValue The new value for the attribute
* @throws ReadOnlyAttributeException when attribute cannot be written
*/
void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException;
void writeAttribute(HttpServerExchange exchange, String newValue) throws ReadOnlyAttributeException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public interface ExchangeAttributeBuilder {
* @param token The string token
* @return The exchange attribute, or null
*/
ExchangeAttribute build(final String token);
ExchangeAttribute build(String token);

/**
* The priority of the builder. Builders will be tried in priority builder. Built in builders use the priority range 0-100,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public interface ClientConnection extends Channel {
*
* @param request The request to send.
*/
void sendRequest(final ClientRequest request, final ClientCallback<ClientExchange> clientCallback);
void sendRequest(ClientRequest request, ClientCallback<ClientExchange> clientCallback);

/**
* Upgrade the connection, if the underlying protocol supports it. This should only be called after an upgrade request
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/io/undertow/client/ClientExchange.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
*/
public interface ClientExchange extends Attachable {

void setResponseListener(final ClientCallback<ClientExchange> responseListener);
void setResponseListener(ClientCallback<ClientExchange> responseListener);

void setContinueHandler(final ContinueNotification continueHandler);
void setContinueHandler(ContinueNotification continueHandler);

void setPushHandler(PushCallback pushCallback);

Expand Down
8 changes: 4 additions & 4 deletions core/src/main/java/io/undertow/client/ClientProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ public interface ClientProvider {

Set<String> handlesSchemes();

void connect(final ClientCallback<ClientConnection> listener, final URI uri, final XnioWorker worker, XnioSsl ssl, ByteBufferPool bufferPool, OptionMap options);
void connect(ClientCallback<ClientConnection> listener, URI uri, XnioWorker worker, XnioSsl ssl, ByteBufferPool bufferPool, OptionMap options);

void connect(final ClientCallback<ClientConnection> listener, InetSocketAddress bindAddress, final URI uri, final XnioWorker worker, XnioSsl ssl, ByteBufferPool bufferPool, OptionMap options);
void connect(ClientCallback<ClientConnection> listener, InetSocketAddress bindAddress, URI uri, XnioWorker worker, XnioSsl ssl, ByteBufferPool bufferPool, OptionMap options);

void connect(final ClientCallback<ClientConnection> listener, final URI uri, final XnioIoThread ioThread, XnioSsl ssl, ByteBufferPool bufferPool, OptionMap options);
void connect(ClientCallback<ClientConnection> listener, URI uri, XnioIoThread ioThread, XnioSsl ssl, ByteBufferPool bufferPool, OptionMap options);

void connect(final ClientCallback<ClientConnection> listener, InetSocketAddress bindAddress, final URI uri, final XnioIoThread ioThread, XnioSsl ssl, ByteBufferPool bufferPool, OptionMap options);
void connect(ClientCallback<ClientConnection> listener, InetSocketAddress bindAddress, URI uri, XnioIoThread ioThread, XnioSsl ssl, ByteBufferPool bufferPool, OptionMap options);

}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public interface UndertowClientMessages {

// 1020
@Message(id = 1020, value = "Failed to upgrade channel due to response %s (%s)")
String failedToUpgradeChannel(final int responseCode, String reason);
String failedToUpgradeChannel(int responseCode, String reason);

// 1030
@Message(id = 1030, value = "invalid content length %d")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public interface FrameCallBack {

void done();

void failed(final IOException e);
void failed(IOException e);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
*/
public interface BufferWritableOutputStream {

void write(final ByteBuffer[] buffers) throws IOException;
void write(ByteBuffer[] buffers) throws IOException;

void write(final ByteBuffer byteBuffer) throws IOException;
void write(ByteBuffer byteBuffer) throws IOException;

void transferFrom(FileChannel source) throws IOException;

Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/io/undertow/io/IoCallback.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
*/
public interface IoCallback {

void onComplete(final HttpServerExchange exchange, final Sender sender);
void onComplete(HttpServerExchange exchange, Sender sender);

void onException(final HttpServerExchange exchange, final Sender sender, final IOException exception);
void onException(HttpServerExchange exchange, Sender sender, IOException exception);

/**
* A default callback that simply ends the exchange.
Expand Down
20 changes: 10 additions & 10 deletions core/src/main/java/io/undertow/io/Sender.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,29 @@ public interface Sender {
* @param buffer The buffer to send.
* @param callback The callback
*/
void send(final ByteBuffer buffer, final IoCallback callback);
void send(ByteBuffer buffer, IoCallback callback);

/**
* Write the given buffers using async IO, and calls the given callback on completion or error.
*
* @param buffer The buffers to send.
* @param callback The callback
*/
void send(final ByteBuffer[] buffer, final IoCallback callback);
void send(ByteBuffer[] buffer, IoCallback callback);

/**
* Write the given buffer using async IO, and ends the exchange when done
*
* @param buffer The buffer to send.
*/
void send(final ByteBuffer buffer);
void send(ByteBuffer buffer);

/**
* Write the given buffers using async IO, and ends the exchange when done
*
* @param buffer The buffers to send.
*/
void send(final ByteBuffer[] buffer);
void send(ByteBuffer[] buffer);

/**
* Write the given String using async IO, and calls the given callback on completion or error.
Expand All @@ -74,7 +74,7 @@ public interface Sender {
* @param data The data to send
* @param callback The callback
*/
void send(final String data, final IoCallback callback);
void send(String data, IoCallback callback);

/**
* Write the given String using async IO, and calls the given callback on completion or error.
Expand All @@ -83,7 +83,7 @@ public interface Sender {
* @param charset The charset to use
* @param callback The callback
*/
void send(final String data, final Charset charset, final IoCallback callback);
void send(String data, Charset charset, IoCallback callback);


/**
Expand All @@ -93,15 +93,15 @@ public interface Sender {
*
* @param data The data to send
*/
void send(final String data);
void send(String data);

/**
* Write the given String using async IO, and ends the exchange when done
*
* @param data The buffer to end.
* @param charset The charset to use
*/
void send(final String data, final Charset charset);
void send(String data, Charset charset);


/**
Expand All @@ -110,14 +110,14 @@ public interface Sender {
* @param channel the file channel to transfer
* @param callback The callback
*/
void transferFrom(final FileChannel channel, final IoCallback callback);
void transferFrom(FileChannel channel, IoCallback callback);

/**
* Closes this sender asynchronously. The given callback is notified on completion
*
* @param callback The callback that is notified when all data has been flushed and the channel is closed
*/
void close(final IoCallback callback);
void close(IoCallback callback);

/**
* Closes this sender asynchronously
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/io/undertow/predicate/Predicate.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ public interface Predicate {
*/
AttachmentKey<Map<String, Object>> PREDICATE_CONTEXT = AttachmentKey.create(Map.class);

boolean resolve(final HttpServerExchange value);
boolean resolve(HttpServerExchange value);

}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public interface PredicateBuilder {
* @param config The predicate config
* @return The new predicate
*/
Predicate build(final Map<String, Object> config);
Predicate build(Map<String, Object> config);

/**
* The priority of the builder. Builders will be tried in priority builder. Built in builders use the priority range 0-100.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ protected PeerMatch(final String pattern, final boolean deny) {
this.deny = deny;
}

public abstract boolean matches(final InetAddress address);
public abstract boolean matches(InetAddress address);

public boolean isDeny() {
return this.deny;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public interface AuthenticatedSessionManager {
*/
AttachmentKey<AuthenticatedSessionManager> ATTACHMENT_KEY = AttachmentKey.create(AuthenticatedSessionManager.class);

AuthenticatedSession lookupSession(final HttpServerExchange exchange);
AuthenticatedSession lookupSession(HttpServerExchange exchange);

void clearSession(HttpServerExchange exchange);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ public interface AuthenticationMechanism {
* @param exchange The exchange
* @return
*/
AuthenticationMechanismOutcome authenticate(final HttpServerExchange exchange,
final SecurityContext securityContext);
AuthenticationMechanismOutcome authenticate(HttpServerExchange exchange,
SecurityContext securityContext);

/**
* Send an authentication challenge to the remote client.
Expand All @@ -80,7 +80,7 @@ AuthenticationMechanismOutcome authenticate(final HttpServerExchange exchange,
* @param securityContext The security context
* @return A {@link ChallengeResult} indicating if a challenge was sent and the desired response code.
*/
ChallengeResult sendChallenge(final HttpServerExchange exchange, final SecurityContext securityContext);
ChallengeResult sendChallenge(HttpServerExchange exchange, SecurityContext securityContext);

/**
* The AuthenticationOutcome is used by an AuthenticationMechanism to indicate the outcome of the call to authenticate, the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ public interface GSSAPIServerSubjectFactory {
* @return The Subject to use for the specified host name or null if no match possible.
* @throws GeneralSecurityException if there is a security failure obtaining the {@link Subject}
*/
Subject getSubjectForHost(final String hostName) throws GeneralSecurityException;
Subject getSubjectForHost(String hostName) throws GeneralSecurityException;

}
4 changes: 2 additions & 2 deletions core/src/main/java/io/undertow/security/api/NonceManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public interface NonceManager {
* @param lastNonce - The last valid nonce received from the client or null if we don't already have a nonce.
* @return The next nonce to be sent in a challenge to the client.
*/
String nextNonce(final String lastNonce, final HttpServerExchange exchange);
String nextNonce(String lastNonce, HttpServerExchange exchange);

/**
* Validate that a nonce can be used.
Expand All @@ -58,6 +58,6 @@ public interface NonceManager {
* @param nonceCount - The nonce count from the client or -1 of none specified.
* @return true if the nonce can be used otherwise return false.
*/
boolean validateNonce(final String nonce, final int nonceCount, final HttpServerExchange exchange);
boolean validateNonce(String nonce, int nonceCount, HttpServerExchange exchange);

}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ public interface NotificationReceiver {
*
* @param notification
*/
void handleNotification(final SecurityNotification notification);
void handleNotification(SecurityNotification notification);

}
Loading

0 comments on commit 6ed8ce8

Please sign in to comment.