You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2025/07/31 12:49:38 UTC
(tomcat) branch main updated: Code clean-up - formatting. No functional change.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 5b5e1738ac Code clean-up - formatting. No functional change.
5b5e1738ac is described below
commit 5b5e1738ace90ca1a720c2e08b4e06d4298672c1
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Jul 31 13:49:32 2025 +0100
Code clean-up - formatting. No functional change.
---
java/org/apache/coyote/http2/ConnectionSettingsBase.java | 2 +-
java/org/apache/coyote/http2/HpackDecoder.java | 7 +++----
java/org/apache/coyote/http2/Http2Protocol.java | 5 ++---
java/org/apache/coyote/http2/Http2UpgradeHandler.java | 4 ++--
java/org/apache/coyote/http2/Stream.java | 2 +-
5 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/java/org/apache/coyote/http2/ConnectionSettingsBase.java b/java/org/apache/coyote/http2/ConnectionSettingsBase.java
index 8fd9f77236..b43db42f91 100644
--- a/java/org/apache/coyote/http2/ConnectionSettingsBase.java
+++ b/java/org/apache/coyote/http2/ConnectionSettingsBase.java
@@ -65,7 +65,7 @@ abstract class ConnectionSettingsBase<T extends Throwable> {
final void set(Setting setting, long value) throws T {
- set(setting, value, false);
+ set(setting, value, false);
}
diff --git a/java/org/apache/coyote/http2/HpackDecoder.java b/java/org/apache/coyote/http2/HpackDecoder.java
index d6fb592f6f..b25554582b 100644
--- a/java/org/apache/coyote/http2/HpackDecoder.java
+++ b/java/org/apache/coyote/http2/HpackDecoder.java
@@ -380,10 +380,9 @@ public class HpackDecoder {
/**
* Are the headers pass to the recipient so far valid? The decoder needs to process all the headers to maintain
- * state even if there is a problem. In addition, it is easy for the intended recipient to track if the
- * complete set of headers is valid since to do that state needs to be maintained between the parsing of the
- * initial headers and the parsing of any trailer headers. The recipient is the best place to maintain that
- * state.
+ * state even if there is a problem. In addition, it is easy for the intended recipient to track if the complete
+ * set of headers is valid since to do that state needs to be maintained between the parsing of the initial
+ * headers and the parsing of any trailer headers. The recipient is the best place to maintain that state.
*
* @throws StreamException If the headers received to date are not valid
*/
diff --git a/java/org/apache/coyote/http2/Http2Protocol.java b/java/org/apache/coyote/http2/Http2Protocol.java
index da2efee352..b8a7d6fde6 100644
--- a/java/org/apache/coyote/http2/Http2Protocol.java
+++ b/java/org/apache/coyote/http2/Http2Protocol.java
@@ -133,9 +133,8 @@ public class Http2Protocol implements UpgradeProtocol {
@Override
public Processor getProcessor(SocketWrapperBase<?> socketWrapper, Adapter adapter) {
- return new UpgradeProcessorInternal(socketWrapper,
- new UpgradeToken(getInternalUpgradeHandler(socketWrapper, adapter, null), null,
- null, getUpgradeProtocolName()),null);
+ return new UpgradeProcessorInternal(socketWrapper, new UpgradeToken(
+ getInternalUpgradeHandler(socketWrapper, adapter, null), null, null, getUpgradeProtocolName()), null);
}
diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 6d33a748d0..4641e4bb25 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -948,8 +948,8 @@ class Http2UpgradeHandler extends AbstractStream implements InternalHttpUpgradeH
} else if (windowSize < 1) {
/*
* The connection window has no capacity. If the stream has not been granted an allocation, and the
- * stream was not already added to the backlog due to a partial reservation (see next else if
- * block) add it to the backlog so it can obtain an allocation when capacity is available.
+ * stream was not already added to the backlog due to a partial reservation (see next else if block)
+ * add it to the backlog so it can obtain an allocation when capacity is available.
*/
if (stream.getConnectionAllocationMade() == 0 && stream.getConnectionAllocationRequested() == 0) {
stream.setConnectionAllocationRequested(reservation);
diff --git a/java/org/apache/coyote/http2/Stream.java b/java/org/apache/coyote/http2/Stream.java
index a83abef2bf..d180969d29 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -1064,7 +1064,7 @@ class Stream extends AbstractNonZeroStream implements HeaderEmitter {
// Only want to return false if the window size is zero AND we are
// already waiting for an allocation.
return (getWindowSize() <= 0 || !allocationManager.isWaitingForStream()) &&
- (handler.getWindowSize() <= 0 || !allocationManager.isWaitingForConnection()) && !dataLeft;
+ (handler.getWindowSize() <= 0 || !allocationManager.isWaitingForConnection()) && !dataLeft;
} finally {
writeLock.unlock();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org