Skip to content

Commit

Permalink
netty 4.2.0 RC1 (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
sullis authored Dec 12, 2024
1 parent f69814a commit b9490cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<slf4j.version>2.0.16</slf4j.version>
<bouncycastle.version>1.79</bouncycastle.version>
<brotli4j.version>1.17.0</brotli4j.version>
<netty.version>4.2.0.Beta1</netty.version>
<netty.version>4.2.0.RC1</netty.version>
<skip.tests>false</skip.tests>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,20 @@

import io.netty.handler.codec.compression.CompressionOptions;
import io.netty.handler.codec.http.HttpContentCompressor;
import org.apache.commons.lang3.reflect.FieldUtils;
import org.junit.jupiter.api.Test;
import java.lang.reflect.Field;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.assertNotNull;

public class HttpContentCompressorTest {
private static final Field FIELD_SUPPORTS_COMPRESSION_OPTIONS = FieldUtils.getDeclaredField(HttpContentCompressor.class, "supportsCompressionOptions", true);

@Test
void zeroArgConstructor_supportsCompressionOptionsIsFalse() throws Exception {
void zeroArgConstructor() throws Exception {
HttpContentCompressor compressor = new HttpContentCompressor();
assertFalse(((Boolean) FIELD_SUPPORTS_COMPRESSION_OPTIONS.get(compressor)));
assertNotNull(compressor);
}

@Test
void compressorOptionsArrayConstructor_supportsCompressionOptionsIsTrue() throws Exception {
void compressorOptionsArrayConstructor() throws Exception {
HttpContentCompressor compressor = new HttpContentCompressor((CompressionOptions[]) null);
assertTrue(((Boolean) FIELD_SUPPORTS_COMPRESSION_OPTIONS.get(compressor)));
assertNotNull(compressor);
}
}

0 comments on commit b9490cb

Please sign in to comment.