Bring codebase up to more recent Java standards (#2422)

This includes using the new switch format (though IntelliJ does not yet
understand patterns including default so those aren't used), multiline strings,
replacing some unnecessary type declarations with <>, converting some classes to
records, replacing some Guava predicates with native Java code, and some other
miscellaneous Code Inspection fixes.
This commit is contained in:
Ben McIlwain
2024-05-01 20:48:38 +00:00
committed by GitHub
parent 570618705e
commit 4b6ade0b14
154 changed files with 1454 additions and 1535 deletions
@@ -48,10 +48,12 @@ class EppProtocolModuleTest extends ProtocolModuleTest {
private static final String CLIENT_ADDRESS = "epp.client.tld";
private static final byte[] HELLO_BYTES =
("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n"
+ "<epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\">\n"
+ " <hello/>\n"
+ "</epp>\n")
"""
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<hello/>
</epp>
"""
.getBytes(UTF_8);
private X509Certificate certificate;
@@ -53,10 +53,12 @@ import org.junit.jupiter.api.Test;
class EppServiceHandlerTest {
private static final String HELLO =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n"
+ "<epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\">\n"
+ " <hello/>\n"
+ "</epp>\n";
"""
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<hello/>
</epp>
""";
private static final String RELAY_HOST = "registry.example.tld";
private static final String RELAY_PATH = "/epp";