From 71d4cb0f6e3363ff56f0b8ebad4463a4ee26ab33 Mon Sep 17 00:00:00 2001 From: luiseufrasio Date: Thu, 19 Dec 2024 10:57:40 -0300 Subject: [PATCH] FISH-61 : only checking if response was commited --- .../java/org/apache/catalina/connector/Response.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/appserver/web/web-core/src/main/java/org/apache/catalina/connector/Response.java b/appserver/web/web-core/src/main/java/org/apache/catalina/connector/Response.java index b87edc2cb7d..f16b9fa69cd 100644 --- a/appserver/web/web-core/src/main/java/org/apache/catalina/connector/Response.java +++ b/appserver/web/web-core/src/main/java/org/apache/catalina/connector/Response.java @@ -55,7 +55,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -// Portions Copyright [2019-2023] Payara Foundation and/or affiliates +// Portions Copyright [2019-2024] Payara Foundation and/or affiliates package org.apache.catalina.connector; @@ -901,15 +901,12 @@ public void resetBuffer(boolean resetWriterStreamFlags) { */ @Override public void setBufferSize(int size) { - - if (isCommitted() || !outputBuffer.isNew()) + if (isCommitted()) { throw new IllegalStateException(rb.getString(LogFacade.CANNOT_CHANGE_BUFFER_SIZE_EXCEPTION)); - + } outputBuffer.setBufferSize(size); - } - /** * Set the content length (in bytes) for this Response. *