Skip to content

Commit 33a883d

Browse files
committed
Downgrade constant deduplication to warning
1 parent ce0e86d commit 33a883d

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ subprojects {
7373
options.errorprone {
7474
check("NullAway", net.ltgt.gradle.errorprone.CheckSeverity.WARN)
7575
option("NullAway:AnnotatedPackages", "com.netflix.zuul")
76+
check("DeduplicateConstants", net.ltgt.gradle.errorprone.CheckSeverity.WARN)
7677
errorproneArgs.addAll(
7778
// Uncomment to automatically apply fixes for a check.
7879
// N.B: disables all other checks while enabled.

zuul-core/src/test/java/com/netflix/zuul/message/ZuulMessageImplTest.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,21 @@
1616

1717
package com.netflix.zuul.message;
1818

19+
import static org.junit.jupiter.api.Assertions.assertEquals;
20+
import static org.junit.jupiter.api.Assertions.assertFalse;
21+
import static org.junit.jupiter.api.Assertions.assertNull;
22+
import static org.junit.jupiter.api.Assertions.assertTrue;
23+
1924
import com.netflix.zuul.context.SessionContext;
2025
import io.netty.buffer.Unpooled;
2126
import io.netty.handler.codec.http.DefaultHttpContent;
2227
import io.netty.handler.codec.http.DefaultLastHttpContent;
2328
import io.netty.handler.codec.http.HttpContent;
29+
import java.nio.charset.StandardCharsets;
2430
import org.junit.jupiter.api.Test;
2531
import org.junit.jupiter.api.extension.ExtendWith;
2632
import org.mockito.junit.jupiter.MockitoExtension;
2733

28-
import java.nio.charset.StandardCharsets;
29-
30-
import static org.junit.jupiter.api.Assertions.*;
31-
3234
@ExtendWith(MockitoExtension.class)
3335
class ZuulMessageImplTest {
3436
private static final String TEXT1 = "Hello World!";
@@ -64,7 +66,7 @@ void testBufferBody2GetBody() {
6466
final String body = new String(msg.getBody());
6567
assertTrue(msg.hasBody());
6668
assertTrue(msg.hasCompleteBody());
67-
assertEquals(TEXT1, body);
69+
assertEquals("Hello World!", body);
6870
assertEquals(0, msg.getHeaders().getAll("Content-Length").size());
6971
}
7072

@@ -77,7 +79,7 @@ void testBufferBody3GetBody() {
7779
final String body = new String(msg.getBody());
7880
assertTrue(msg.hasBody());
7981
assertTrue(msg.hasCompleteBody());
80-
assertEquals(TEXT1, body);
82+
assertEquals("Hello World!", body);
8183
assertEquals(0, msg.getHeaders().getAll("Content-Length").size());
8284
}
8385

@@ -90,7 +92,7 @@ void testBufferBody3GetBodyAsText() {
9092
final String body = msg.getBodyAsText();
9193
assertTrue(msg.hasBody());
9294
assertTrue(msg.hasCompleteBody());
93-
assertEquals(TEXT1, body);
95+
assertEquals("Hello World!", body);
9496
assertEquals(0, msg.getHeaders().getAll("Content-Length").size());
9597
}
9698

0 commit comments

Comments
 (0)