Skip to content

Commit 91e045c

Browse files
authored
Merge pull request #32756 from pnicolucci/UpdateStripWhiteSpacesJavadoc
Update javadoc in NettyHeaderUtils
2 parents bb12e05 + 7dddac4 commit 91e045c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/netty/NettyHeaderUtils.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,12 @@ public static void setVary(HttpHeaders headers, String value) {
7171
}
7272

7373
/**
74-
* @param acceptEncodingHeader
75-
* @return
74+
* Strip whitespace from a given String.
75+
*
76+
* @param string The String to strip whitespace from.
77+
* @return an empty String if the given String is null, otherwise a String with all whitespace removed.
7678
*/
77-
public static String stripWhiteSpaces(String string) {
79+
public static String stripWhiteSpace(String string) {
7880
return Objects.isNull(string) ? HttpConstants.EMPTY_STRING : string.replaceAll("\\s+", "");
7981
}
8082

dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/netty/pipeline/ResponseCompressionHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ private void parseAcceptEncodingHeader() {
298298
return;
299299
}
300300

301-
acceptEncodingHeader = NettyHeaderUtils.stripWhiteSpaces(acceptEncodingHeader).toLowerCase();
301+
acceptEncodingHeader = NettyHeaderUtils.stripWhiteSpace(acceptEncodingHeader).toLowerCase();
302302

303303
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
304304
Tr.debug(tc, method, "parsing [" + acceptEncodingHeader + "]");

0 commit comments

Comments
 (0)