Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package netty for openSUSE:Factory checked 
in at 2025-02-11 21:31:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/netty (Old)
 and      /work/SRC/openSUSE:Factory/.netty.new.19470 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "netty"

Tue Feb 11 21:31:25 2025 rev:4 rq:1245120 version:4.1.118

Changes:
--------
--- /work/SRC/openSUSE:Factory/netty/netty.changes      2024-12-05 
17:13:52.102732462 +0100
+++ /work/SRC/openSUSE:Factory/.netty.new.19470/netty.changes   2025-02-11 
21:31:34.715469614 +0100
@@ -1,0 +2,67 @@
+Tue Feb 11 14:38:06 UTC 2025 - Fridrich Strba <fst...@suse.com>
+
+- Upgrade to upstream version 4.1.118
+  * Fixes of 4.1.118
+    + SslHandler doesn't correctly validate packets which can lead
+      to native crash when using native SSLEngine (bsc#1237037,
+      CVE-2025-24970)
+    + Denial of Service attack on windows app using Netty, again
+      (bsc#1237038, CVE-2025-25193)
+    + Upgrade netty-tcnative to 2.0.70.Final
+    + Fix recycling in CodecOutputList
+    + Allocate bytebuf without magazine lock when threads get
+      collisions
+    + Make StreamBufferingEncoder not send header frame with
+      priority by default
+    + Notify event loop termination future of unexpected exceptions
+    + KQueueEventLoop leaks memory on shutdown
+    + Fix AccessControlException in GlobalEventExecutor
+    + Fix possible buffer leak when stream can't be mapped
+    + AdaptivePoolingAllocator: Round chunk sizes up to
+      MIN_CHUNK_SIZE units and reduce chunk release frequency
+  * Fixes of 4.1.117
+    + Fix classloader leaks in GlobalEventExecuto
+    + Support BouncyCastle FIPS for reading PEM files
+    + Dns: Correctly encode DnsPtrRecord
+    + Provides Brotli settings without com.aayushatharva.brotli4j
+      dependency
+    + Make DefaultResourceLeak more resilient against OOM
+    + OpenSslSession: Add support to defensively check for peer
+      certs
+    + Reentrant close in EmbeddedChannel
+    + SslHandler: Ensure buffers are never leaked when wrap(...)
+      produce SSLException
+    + Adaptive: Only use ThreadLocal if called from
+      FastThreadLocalThread in case of temporary byte[] allocation
+    + Correcly handle comments appended to nameserver declarations
+  * Fixes of 4.1.116
+    + PcapWriteHandler no longer ignores writePcapGlobalHeader
+    + Allow PcapWriteHandler to output PCAP files larger than 2GB
+    + Fix bugs in BoundedInputStream
+    + AdaptiveByteBufAllocator will not use threadlocal magazine if
+      FastThreadLocalThread.willCleanupFastThreadLocals() returns
+      false
+    + Fix HTTP header validation bug
+    + Add range check for
+      AdaptivePoolingAllocator.CENTRAL_QUEUE_CAPACITY and
+      MAGAZINE_BUFFER_QUEUE_CAPACITY
+    + Fix possible race condition in method
+      AdaptivePoolingAllocator.offerToQueue(...)
+    + Make sure the sentinel Magazine.MAGAZINE_FREED not be replaced
+    + Decrease usedMemory of magazine when the chunk get deallocate
+    + Only try to use Zstd and Brotli if we can load the native libs
+    + AdaptiveByteBufAllocator: Correctly manage used memory
+      strategy in all cases
+    + Bump BlockHound version to 1.0.10.RELEASE
+    + Add details to TooLongFrameException message
+    + Adapt: Only add Chunk to central Queue if unused
+    + Adapt: Don't fail when we run on a host with 1 core
+    + Adapt: Ensure Chunks from the central Queue are re-used even
+      if there are Magazine local cached Chunks
+- Modified patches:
+  * 0001-Remove-optional-dep-Blockhound.patch
+  * 0002-Remove-optional-dep-conscrypt.patch
+  * 0004-Disable-Brotli-and-ZStd-compression.patch
+    + rediff
+
+-------------------------------------------------------------------

Old:
----
  netty-4.1.115.Final.tar.gz

New:
----
  netty-4.1.118.Final.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ netty.spec ++++++
--- /var/tmp/diff_new_pack.f6zP3a/_old  2025-02-11 21:31:35.783513671 +0100
+++ /var/tmp/diff_new_pack.f6zP3a/_new  2025-02-11 21:31:35.787513836 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package netty
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %global namedreltag .Final
 %global namedversion %{version}%{?namedreltag}
 Name:           netty
-Version:        4.1.115
+Version:        4.1.118
 Release:        0
 Summary:        An asynchronous event-driven network application framework and 
tools for Java
 License:        Apache-2.0

++++++ 0001-Remove-optional-dep-Blockhound.patch ++++++
--- /var/tmp/diff_new_pack.f6zP3a/_old  2025-02-11 21:31:35.811514825 +0100
+++ /var/tmp/diff_new_pack.f6zP3a/_new  2025-02-11 21:31:35.815514990 +0100
@@ -1,19 +1,19 @@
-From fde40bfedf245b8cd6f48d8681a29df1aa5d4036 Mon Sep 17 00:00:00 2001
+From e4d00571feb88e27151b3cc2d4d62cbf7cb57577 Mon Sep 17 00:00:00 2001
 From: Mat Booth <mat.bo...@redhat.com>
 Date: Mon, 7 Sep 2020 12:17:31 +0100
 Subject: [PATCH 1/7] Remove optional dep Blockhound
 
 ---
  common/pom.xml                                |   5 -
- .../java/io/netty/util/internal/Hidden.java   | 190 ------
+ .../java/io/netty/util/internal/Hidden.java   | 200 ------
  ...ockhound.integration.BlockHoundIntegration |  14 -
  pom.xml                                       |   8 -
- transport-blockhound-tests/pom.xml            | 163 -----
- .../NettyBlockHoundIntegrationTest.java       | 575 ------------------
+ transport-blockhound-tests/pom.xml            | 172 ------
+ .../NettyBlockHoundIntegrationTest.java       | 569 ------------------
  .../netty/util/internal/localhost_server.key  |  28 -
  .../netty/util/internal/localhost_server.pem  |  17 -
  .../io/netty/util/internal/mutual_auth_ca.pem |  19 -
- 9 files changed, 1019 deletions(-)
+ 9 files changed, 1032 deletions(-)
  delete mode 100644 common/src/main/java/io/netty/util/internal/Hidden.java
  delete mode 100644 
common/src/main/resources/META-INF/services/reactor.blockhound.integration.BlockHoundIntegration
  delete mode 100644 transport-blockhound-tests/pom.xml
@@ -23,7 +23,7 @@
  delete mode 100644 
transport-blockhound-tests/src/test/resources/io/netty/util/internal/mutual_auth_ca.pem
 
 diff --git a/common/pom.xml b/common/pom.xml
-index d59644adcf..77a3e430da 100644
+index d7a5e0cc5f..1ebc9edf35 100644
 --- a/common/pom.xml
 +++ b/common/pom.xml
 @@ -82,11 +82,6 @@
@@ -40,10 +40,10 @@
        <artifactId>mockito-core</artifactId>
 diff --git a/common/src/main/java/io/netty/util/internal/Hidden.java 
b/common/src/main/java/io/netty/util/internal/Hidden.java
 deleted file mode 100644
-index cf32e154ff..0000000000
+index e227c90c7e..0000000000
 --- a/common/src/main/java/io/netty/util/internal/Hidden.java
 +++ /dev/null
-@@ -1,190 +0,0 @@
+@@ -1,200 +0,0 @@
 -/*
 - * Copyright 2019 The Netty Project
 - *
@@ -142,6 +142,16 @@
 -            );
 -
 -            builder.allowBlockingCallsInside(
+-                    "io.netty.buffer.AdaptivePoolingAllocator$1",
+-                    "initialValue"
+-            );
+-
+-            builder.allowBlockingCallsInside(
+-                    "io.netty.buffer.AdaptivePoolingAllocator$1",
+-                    "onRemoval"
+-            );
+-
+-            builder.allowBlockingCallsInside(
 -                    "io.netty.handler.ssl.SslHandler",
 -                    "handshake"
 -            );
@@ -256,10 +266,10 @@
 -io.netty.util.internal.Hidden$NettyBlockHoundIntegration
 \ No newline at end of file
 diff --git a/pom.xml b/pom.xml
-index 0cea28ab0a..bf36e0b533 100644
+index 855fedf5e2..76f3dc1728 100644
 --- a/pom.xml
 +++ b/pom.xml
-@@ -779,7 +779,6 @@
+@@ -816,7 +816,6 @@
      <module>testsuite-native-image</module>
      <module>testsuite-native-image-client</module>
      <module>testsuite-native-image-client-runtime-init</module>
@@ -267,7 +277,7 @@
      <module>microbench</module>
      <module>bom</module>
    </modules>
-@@ -1198,13 +1197,6 @@
+@@ -1244,13 +1243,6 @@
          <version>${log4j2.version}</version>
          <scope>test</scope>
        </dependency>
@@ -276,17 +286,17 @@
 -      <dependency>
 -        <groupId>io.projectreactor.tools</groupId>
 -        <artifactId>blockhound</artifactId>
--        <version>1.0.6.RELEASE</version>
+-        <version>1.0.10.RELEASE</version>
 -      </dependency>
      </dependencies>
    </dependencyManagement>
  
 diff --git a/transport-blockhound-tests/pom.xml 
b/transport-blockhound-tests/pom.xml
 deleted file mode 100644
-index 4b273251fe..0000000000
+index 89d0fc9ecc..0000000000
 --- a/transport-blockhound-tests/pom.xml
 +++ /dev/null
-@@ -1,163 +0,0 @@
+@@ -1,172 +0,0 @@
 -<?xml version="1.0" encoding="UTF-8"?>
 -<!--
 -  ~ Copyright 2019 The Netty Project
@@ -309,7 +319,7 @@
 -  <parent>
 -    <groupId>io.netty</groupId>
 -    <artifactId>netty-parent</artifactId>
--    <version>4.1.115.Final</version>
+-    <version>4.1.118.Final</version>
 -  </parent>
 -
 -  <artifactId>netty-transport-blockhound-tests</artifactId>
@@ -402,6 +412,15 @@
 -        
<argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
 -      </properties>
 -    </profile>
+-    <profile>
+-      <id>java22</id>
+-      <activation>
+-        <jdk>22</jdk>
+-      </activation>
+-      <properties>
+-        
<argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
+-      </properties>
+-    </profile>
 -  </profiles>
 -
 -  <properties>
@@ -452,10 +471,10 @@
 -</project>
 diff --git 
a/transport-blockhound-tests/src/test/java/io/netty/util/internal/NettyBlockHoundIntegrationTest.java
 
b/transport-blockhound-tests/src/test/java/io/netty/util/internal/NettyBlockHoundIntegrationTest.java
 deleted file mode 100644
-index 945f2a2891..0000000000
+index 907fd864f3..0000000000
 --- 
a/transport-blockhound-tests/src/test/java/io/netty/util/internal/NettyBlockHoundIntegrationTest.java
 +++ /dev/null
-@@ -1,575 +0,0 @@
+@@ -1,569 +0,0 @@
 -/*
 - * Copyright 2019 The Netty Project
 -
@@ -513,7 +532,6 @@
 -import org.junit.jupiter.api.BeforeAll;
 -import org.junit.jupiter.api.Test;
 -import org.junit.jupiter.api.Timeout;
--import org.junit.jupiter.api.condition.DisabledIf;
 -import reactor.blockhound.BlockHound;
 -import reactor.blockhound.BlockingOperationError;
 -import reactor.blockhound.integration.BlockHoundIntegration;
@@ -545,13 +563,8 @@
 -import static org.junit.jupiter.api.Assertions.fail;
 -import static org.junit.jupiter.api.Assumptions.assumeTrue;
 -
--@DisabledIf("isDisabledIfJavaVersion18OrAbove")
 -public class NettyBlockHoundIntegrationTest {
 -
--    private static boolean isDisabledIfJavaVersion18OrAbove() {
--        return PlatformDependent.javaVersion() >= 18;
--    }
--
 -    @BeforeAll
 -    public static void setUpClass() {
 -        BlockHound.install();
@@ -1114,6 +1127,6 @@
 -hH82y9bBeflqroOeztqMpONpWoZjlz0sWbJNvXztXINL7LaNmVYOcoUrCcxPS54T
 ------END CERTIFICATE-----
 -- 
-2.46.1
+2.48.1
 
 

++++++ 0002-Remove-optional-dep-conscrypt.patch ++++++
--- /var/tmp/diff_new_pack.f6zP3a/_old  2025-02-11 21:31:35.831515650 +0100
+++ /var/tmp/diff_new_pack.f6zP3a/_new  2025-02-11 21:31:35.835515815 +0100
@@ -1,4 +1,4 @@
-From d0325cfed137fe5ea400d7344c38f0deac43959a Mon Sep 17 00:00:00 2001
+From 55c1dd2fea13516c9fee6b5365bd6fe7e701a7ec Mon Sep 17 00:00:00 2001
 From: Mat Booth <mat.bo...@redhat.com>
 Date: Mon, 7 Sep 2020 13:24:30 +0100
 Subject: [PATCH 2/7] Remove optional dep conscrypt
@@ -15,7 +15,7 @@
  delete mode 100644 
handler/src/main/java/io/netty/handler/ssl/ConscryptAlpnSslEngine.java
 
 diff --git a/handler/pom.xml b/handler/pom.xml
-index 8e21f87533..46c20028eb 100644
+index 36ebf83f49..f5f179584b 100644
 --- a/handler/pom.xml
 +++ b/handler/pom.xml
 @@ -96,12 +96,6 @@
@@ -367,7 +367,7 @@
              // https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8230977.
              // Because of this lets not do a Java version runtime check but 
just depend on if the required methods are
 diff --git a/handler/src/main/java/io/netty/handler/ssl/SslHandler.java 
b/handler/src/main/java/io/netty/handler/ssl/SslHandler.java
-index 019bb38f90..40a46d21b7 100644
+index 2e8e15fd84..1a6a84b1c6 100644
 --- a/handler/src/main/java/io/netty/handler/ssl/SslHandler.java
 +++ b/handler/src/main/java/io/netty/handler/ssl/SslHandler.java
 @@ -251,55 +251,6 @@ public class SslHandler extends ByteToMessageDecoder 
implements ChannelOutboundH
@@ -437,10 +437,10 @@
  
          SslEngineType(boolean wantsDirectBuffer, Cumulator cumulator) {
 diff --git a/pom.xml b/pom.xml
-index bf36e0b533..ae68f4ebe8 100644
+index 76f3dc1728..b3188b816f 100644
 --- a/pom.xml
 +++ b/pom.xml
-@@ -858,16 +858,6 @@
+@@ -895,16 +895,6 @@
          <optional>true</optional>
        </dependency>
  
@@ -454,10 +454,10 @@
 -        <optional>true</optional>
 -      </dependency>
 -
-       <!--
-         Bouncy Castle - completely optional, only needed when:
-         - you generate a temporary self-signed certificate using 
SelfSignedCertificate, and
+       <!-- ACCP - needed for running tests, used for accelerating SSL with 
OpenSSL. -->
+       <dependency>
+         <groupId>software.amazon.cryptools</groupId>
 -- 
-2.46.1
+2.48.1
 
 

++++++ 0004-Disable-Brotli-and-ZStd-compression.patch ++++++
--- /var/tmp/diff_new_pack.f6zP3a/_old  2025-02-11 21:31:35.855516640 +0100
+++ /var/tmp/diff_new_pack.f6zP3a/_new  2025-02-11 21:31:35.859516805 +0100
@@ -1,21 +1,21 @@
-From ce73ba58d8c6c733fdc060d89ac6d229a55fdd28 Mon Sep 17 00:00:00 2001
+From 54262615f71f8e201500f31c5fb96d4103228711 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.st...@bluewin.ch>
 Date: Thu, 30 Mar 2023 13:19:04 +0200
 Subject: [PATCH 4/7] Disable Brotli and ZStd compression
 
 ---
- .../codec/http/HttpContentCompressor.java     | 105 +-----------------
+ .../codec/http/HttpContentCompressor.java     | 107 +-----------------
  .../codec/http/HttpContentDecompressor.java   |  22 ----
  .../CompressorHttp2ConnectionEncoder.java     |  42 +------
  .../DelegatingDecompressorFrameListener.java  |  20 ----
- .../StandardCompressionOptions.java           |  53 +--------
- 5 files changed, 5 insertions(+), 237 deletions(-)
+ .../StandardCompressionOptions.java           |  70 +-----------
+ 5 files changed, 5 insertions(+), 256 deletions(-)
 
 diff --git 
a/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentCompressor.java
 
b/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentCompressor.java
-index 0effd37779..51e6c10934 100644
+index 17f55d3ed5..27da52dd9a 100644
 --- 
a/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentCompressor.java
 +++ 
b/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentCompressor.java
-@@ -22,9 +22,6 @@ import io.netty.buffer.ByteBuf;
+@@ -24,9 +24,6 @@ import io.netty.buffer.ByteBuf;
  import io.netty.channel.ChannelHandlerContext;
  import io.netty.channel.embedded.EmbeddedChannel;
  import io.netty.handler.codec.MessageToByteEncoder;
@@ -25,7 +25,7 @@
  import io.netty.handler.codec.compression.CompressionOptions;
  import io.netty.handler.codec.compression.DeflateOptions;
  import io.netty.handler.codec.compression.GzipOptions;
-@@ -32,11 +29,6 @@ import 
io.netty.handler.codec.compression.StandardCompressionOptions;
+@@ -34,11 +31,6 @@ import 
io.netty.handler.codec.compression.StandardCompressionOptions;
  import io.netty.handler.codec.compression.ZlibCodecFactory;
  import io.netty.handler.codec.compression.ZlibEncoder;
  import io.netty.handler.codec.compression.ZlibWrapper;
@@ -36,32 +36,20 @@
 -import io.netty.handler.codec.compression.SnappyOptions;
  import io.netty.util.internal.ObjectUtil;
  
- /**
-@@ -49,11 +41,8 @@ import io.netty.util.internal.ObjectUtil;
+ import static io.netty.util.internal.ObjectUtil.checkInRange;
+@@ -52,11 +44,8 @@ import static 
io.netty.util.internal.ObjectUtil.checkInRange;
+  */
  public class HttpContentCompressor extends HttpContentEncoder {
  
-     private final boolean supportsCompressionOptions;
 -    private final BrotliOptions brotliOptions;
      private final GzipOptions gzipOptions;
      private final DeflateOptions deflateOptions;
 -    private final ZstdOptions zstdOptions;
 -    private final SnappyOptions snappyOptions;
  
-     private final int compressionLevel;
-     private final int windowBits;
-@@ -137,11 +126,8 @@ public class HttpContentCompressor extends 
HttpContentEncoder {
-         this.windowBits = ObjectUtil.checkInRange(windowBits, 9, 15, 
"windowBits");
-         this.memLevel = ObjectUtil.checkInRange(memLevel, 1, 9, "memLevel");
-         this.contentSizeThreshold = 
ObjectUtil.checkPositiveOrZero(contentSizeThreshold, "contentSizeThreshold");
--        this.brotliOptions = null;
-         this.gzipOptions = null;
-         this.deflateOptions = null;
--        this.zstdOptions = null;
--        this.snappyOptions = null;
-         this.factories = null;
-         this.supportsCompressionOptions = false;
-     }
-@@ -170,17 +156,11 @@ public class HttpContentCompressor extends 
HttpContentEncoder {
+     private final int contentSizeThreshold;
+     private ChannelHandlerContext ctx;
+@@ -174,11 +163,8 @@ public class HttpContentCompressor extends 
HttpContentEncoder {
       */
      public HttpContentCompressor(int contentSizeThreshold, 
CompressionOptions... compressionOptions) {
          this.contentSizeThreshold = 
ObjectUtil.checkPositiveOrZero(contentSizeThreshold, "contentSizeThreshold");
@@ -71,33 +59,27 @@
 -        ZstdOptions zstdOptions = null;
 -        SnappyOptions snappyOptions = null;
          if (compressionOptions == null || compressionOptions.length == 0) {
--            brotliOptions = Brotli.isAvailable() ? 
StandardCompressionOptions.brotli() : null;
-             gzipOptions = StandardCompressionOptions.gzip();
-             deflateOptions = StandardCompressionOptions.deflate();
--            zstdOptions = Zstd.isAvailable() ? 
StandardCompressionOptions.zstd() : null;
--            snappyOptions = StandardCompressionOptions.snappy();
-         } else {
-             ObjectUtil.deepCheckNotNull("compressionOptions", 
compressionOptions);
-             for (CompressionOptions compressionOption : compressionOptions) {
-@@ -190,16 +170,10 @@ public class HttpContentCompressor extends 
HttpContentEncoder {
-                 // This results in the static analysis of native-image 
identifying the instanceof BrotliOptions check
-                 // and thus BrotliOptions itself as unreachable, enabling 
native-image to link all classes
-                 // at build time and not complain about the missing Brotli 
classes.
--                if (Brotli.isAvailable() && compressionOption instanceof 
BrotliOptions) {
--                    brotliOptions = (BrotliOptions) compressionOption;
--                } else if (compressionOption instanceof GzipOptions) {
-+                if (compressionOption instanceof GzipOptions) {
-                     gzipOptions = (GzipOptions) compressionOption;
-                 } else if (compressionOption instanceof DeflateOptions) {
-                     deflateOptions = (DeflateOptions) compressionOption;
--                } else if (compressionOption instanceof ZstdOptions) {
--                    zstdOptions = (ZstdOptions) compressionOption;
--                } else if (compressionOption instanceof SnappyOptions) {
--                    snappyOptions = (SnappyOptions) compressionOption;
-                 } else {
-                     throw new IllegalArgumentException("Unsupported " + 
CompressionOptions.class.getSimpleName() +
-                             ": " + compressionOption);
-@@ -209,9 +183,6 @@ public class HttpContentCompressor extends 
HttpContentEncoder {
+             compressionOptions = defaultCompressionOptions(
+                     StandardCompressionOptions.gzip(), 
StandardCompressionOptions.deflate());
+@@ -192,16 +178,10 @@ public class HttpContentCompressor extends 
HttpContentEncoder {
+             // This results in the static analysis of native-image 
identifying the instanceof BrotliOptions check
+             // and thus BrotliOptions itself as unreachable, enabling 
native-image to link all classes
+             // at build time and not complain about the missing Brotli 
classes.
+-            if (Brotli.isAvailable() && compressionOption instanceof 
BrotliOptions) {
+-                brotliOptions = (BrotliOptions) compressionOption;
+-            } else if (compressionOption instanceof GzipOptions) {
++            if (compressionOption instanceof GzipOptions) {
+                 gzipOptions = (GzipOptions) compressionOption;
+             } else if (compressionOption instanceof DeflateOptions) {
+                 deflateOptions = (DeflateOptions) compressionOption;
+-            } else if (Zstd.isAvailable() && compressionOption instanceof 
ZstdOptions) {
+-                zstdOptions = (ZstdOptions) compressionOption;
+-            } else if (compressionOption instanceof SnappyOptions) {
+-                snappyOptions = (SnappyOptions) compressionOption;
+             } else {
+                 throw new IllegalArgumentException("Unsupported " + 
CompressionOptions.class.getSimpleName() +
+                         ": " + compressionOption);
+@@ -210,9 +190,6 @@ public class HttpContentCompressor extends 
HttpContentEncoder {
  
          this.gzipOptions = gzipOptions;
          this.deflateOptions = deflateOptions;
@@ -107,7 +89,7 @@
  
          this.factories = new HashMap<String, CompressionEncoderFactory>();
  
-@@ -221,15 +192,6 @@ public class HttpContentCompressor extends 
HttpContentEncoder {
+@@ -222,15 +199,6 @@ public class HttpContentCompressor extends 
HttpContentEncoder {
          if (this.deflateOptions != null) {
              this.factories.put("deflate", new DeflateEncoderFactory());
          }
@@ -120,10 +102,25 @@
 -        if (this.snappyOptions != null) {
 -            this.factories.put("snappy", new SnappyEncoderFactory());
 -        }
+     }
+ 
+     private static CompressionOptions[] defaultCompressionOptions(
+@@ -238,14 +206,6 @@ public class HttpContentCompressor extends 
HttpContentEncoder {
+         List<CompressionOptions> options = new 
ArrayList<CompressionOptions>(5);
+         options.add(gzipOptions);
+         options.add(deflateOptions);
+-        options.add(StandardCompressionOptions.snappy());
+-
+-        if (Brotli.isAvailable()) {
+-            options.add(StandardCompressionOptions.brotli());
+-        }
+-        if (Zstd.isAvailable()) {
+-            options.add(StandardCompressionOptions.zstd());
+-        }
+         return options.toArray(new CompressionOptions[0]);
+     }
  
-         this.compressionLevel = -1;
-         this.windowBits = -1;
-@@ -302,9 +264,6 @@ public class HttpContentCompressor extends 
HttpContentEncoder {
+@@ -289,9 +249,6 @@ public class HttpContentCompressor extends 
HttpContentEncoder {
      @SuppressWarnings("FloatingPointEquality")
      protected String determineEncoding(String acceptEncoding) {
          float starQ = -1.0f;
@@ -133,7 +130,7 @@
          float gzipQ = -1.0f;
          float deflateQ = -1.0f;
          for (String encoding : acceptEncoding.split(",")) {
-@@ -320,41 +279,20 @@ public class HttpContentCompressor extends 
HttpContentEncoder {
+@@ -307,41 +264,20 @@ public class HttpContentCompressor extends 
HttpContentEncoder {
              }
              if (encoding.contains("*")) {
                  starQ = q;
@@ -177,7 +174,7 @@
              if (gzipQ == -1.0f && this.gzipOptions != null) {
                  return "gzip";
              }
-@@ -435,41 +373,4 @@ public class HttpContentCompressor extends 
HttpContentEncoder {
+@@ -422,41 +358,4 @@ public class HttpContentCompressor extends 
HttpContentEncoder {
                      deflateOptions.windowBits(), deflateOptions.memLevel());
          }
      }
@@ -420,25 +417,27 @@
          return null;
      }
 diff --git 
a/codec/src/main/java/io/netty/handler/codec/compression/StandardCompressionOptions.java
 
b/codec/src/main/java/io/netty/handler/codec/compression/StandardCompressionOptions.java
-index ac2582418c..698c4b510a 100644
+index 38793a97e6..c1f1c8c17c 100644
 --- 
a/codec/src/main/java/io/netty/handler/codec/compression/StandardCompressionOptions.java
 +++ 
b/codec/src/main/java/io/netty/handler/codec/compression/StandardCompressionOptions.java
-@@ -15,10 +15,8 @@
+@@ -15,11 +15,10 @@
   */
  package io.netty.handler.codec.compression;
  
 -import com.aayushatharva.brotli4j.encoder.Encoder;
--
+ import io.netty.util.internal.ObjectUtil;
+ 
  /**
 - * Standard Compression Options for {@link BrotliOptions},
 + * Standard Compression Options for
   * {@link GzipOptions} and {@link DeflateOptions}
   */
  public final class StandardCompressionOptions {
-@@ -28,55 +26,6 @@ public final class StandardCompressionOptions {
+@@ -28,73 +27,6 @@ public final class StandardCompressionOptions {
+         // Prevent outside initialization
      }
  
-     /**
+-    /**
 -     * Default implementation of {@link BrotliOptions} with {@link 
Encoder.Parameters#setQuality(int)} set to 4
 -     * and {@link Encoder.Parameters#setMode(Encoder.Mode)} set to {@link 
Encoder.Mode#TEXT}
 -     */
@@ -451,12 +450,34 @@
 -     *
 -     * @param parameters {@link Encoder.Parameters} Instance
 -     * @throws NullPointerException If {@link Encoder.Parameters} is {@code 
null}
+-     * @deprecated Use {@link #brotli(int, int, BrotliMode)}
 -     */
+-    @Deprecated
 -    public static BrotliOptions brotli(Encoder.Parameters parameters) {
 -        return new BrotliOptions(parameters);
 -    }
 -
 -    /**
+-     * Create a new {@link BrotliOptions}
+-     *
+-     * @param quality Specifies the compression level.
+-     * @param window  Specifies the size of the sliding window when 
compressing.
+-     * @param mode    optimizes the compression algorithm based on the type 
of input data.
+-     * @throws NullPointerException If {@link BrotliMode} is {@code null}
+-     */
+-    public static BrotliOptions brotli(int quality, int window, BrotliMode 
mode) {
+-        ObjectUtil.checkInRange(quality, 0, 11, "quality");
+-        ObjectUtil.checkInRange(window, 10, 24, "window");
+-        ObjectUtil.checkNotNull(mode, "mode");
+-
+-        Encoder.Parameters parameters = new Encoder.Parameters()
+-                .setQuality(quality)
+-                .setWindow(window)
+-                .setMode(mode.adapt());
+-        return new BrotliOptions(parameters);
+-    }
+-
+-    /**
 -     * Default implementation of {@link ZstdOptions} 
with{compressionLevel(int)} set to
 -     * {@link ZstdConstants#DEFAULT_COMPRESSION_LEVEL},{@link 
ZstdConstants#DEFAULT_BLOCK_SIZE},
 -     * {@link ZstdConstants#MAX_BLOCK_SIZE}
@@ -468,12 +489,9 @@
 -    /**
 -     * Create a new {@link ZstdOptions}
 -     *
--     * @param  blockSize
--     *           is used to calculate the compressionLevel
--     * @param  maxEncodeSize
--     *           specifies the size of the largest compressed object
--     * @param  compressionLevel
--     *           specifies the level of the compression
+-     * @param blockSize        is used to calculate the compressionLevel
+-     * @param maxEncodeSize    specifies the size of the largest compressed 
object
+-     * @param compressionLevel specifies the level of the compression
 -     */
 -    public static ZstdOptions zstd(int compressionLevel, int blockSize, int 
maxEncodeSize) {
 -        return new ZstdOptions(compressionLevel, blockSize, maxEncodeSize);
@@ -481,17 +499,15 @@
 -
 -    /**
 -     * Create a new {@link SnappyOptions}
--     *
 -     */
 -    public static SnappyOptions snappy() {
 -        return new SnappyOptions();
 -    }
 -
--     /**
+     /**
       * Default implementation of {@link GzipOptions} with
       * {@code compressionLevel()} set to 6, {@code windowBits()} set to 15 
and {@code memLevel()} set to 8.
-      */
 -- 
-2.46.1
+2.48.1
 
 

++++++ netty-4.1.115.Final.tar.gz -> netty-4.1.118.Final.tar.gz ++++++
++++ 7889 lines of diff (skipped)

Reply via email to