Updated checkstyle plugin to latest 3.1.0 (#4364)
* Updated checkstyle plugin to latest 3.1.0 + puppycrawl 8.28 + corresponding necessary changes in checkstyle XML files
Signed-off-by: Jan Supol <jan.supol@oracle.com>
diff --git a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/HttpHeadersTest.java b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/HttpHeadersTest.java
index 438f4f1..2772864 100644
--- a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/HttpHeadersTest.java
+++ b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/HttpHeadersTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -35,7 +35,7 @@
*
* @author Stepan Kopriva
*/
-public class HttpHeadersTest extends JerseyTest{
+public class HttpHeadersTest extends JerseyTest {
@Path("/test")
public static class HttpMethodResource {
@POST
diff --git a/containers/netty-http/src/main/java/org/glassfish/jersey/netty/httpserver/NettySecurityContext.java b/containers/netty-http/src/main/java/org/glassfish/jersey/netty/httpserver/NettySecurityContext.java
index b6fcc06..989f7b2 100644
--- a/containers/netty-http/src/main/java/org/glassfish/jersey/netty/httpserver/NettySecurityContext.java
+++ b/containers/netty-http/src/main/java/org/glassfish/jersey/netty/httpserver/NettySecurityContext.java
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018 Ian Kirk. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -52,4 +53,4 @@
public String getAuthenticationScheme() {
return null;
}
-};
+}
diff --git a/core-client/src/test/java/org/glassfish/jersey/client/spi/PostInvocationInterceptorTest.java b/core-client/src/test/java/org/glassfish/jersey/client/spi/PostInvocationInterceptorTest.java
index 497fdb2..1f5ceda 100644
--- a/core-client/src/test/java/org/glassfish/jersey/client/spi/PostInvocationInterceptorTest.java
+++ b/core-client/src/test/java/org/glassfish/jersey/client/spi/PostInvocationInterceptorTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -67,7 +67,11 @@
final Invocation.Builder builder = ClientBuilder.newBuilder()
.register(new CounterPreInvocationInterceptor(a -> { throw new IllegalStateException(); }))
.register(new CounterPostInvocationInterceptor(
- (a, b) -> false, (a, b) -> { b.resolve(Response.accepted().build()); return true; }))
+ (a, b) -> false,
+ (a, b) -> {
+ b.resolve(Response.accepted().build());
+ return true;
+ }))
.build().target(URL).request();
try (Response response = builder.get()) {
Assert.assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatus());
@@ -80,7 +84,11 @@
final Invocation.Builder builder = ClientBuilder.newBuilder()
.register(new CounterPreInvocationInterceptor(a -> { throw new IllegalStateException(); }))
.register(new CounterPostInvocationInterceptor(
- (a, b) -> false, (a, b) -> { b.resolve(Response.accepted().build()); return true; }))
+ (a, b) -> false,
+ (a, b) -> {
+ b.resolve(Response.accepted().build());
+ return true;
+ }))
.build().target(URL).request();
try (Response response = builder.async().get().get()) {
Assert.assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatus());
@@ -94,7 +102,11 @@
final Invocation.Builder builder = ClientBuilder.newBuilder()
.register(filter)
.register(new CounterPostInvocationInterceptor(
- (a, b) -> false, (a, b) -> { b.resolve(Response.accepted().build()); return true; }))
+ (a, b) -> false,
+ (a, b) -> {
+ b.resolve(Response.accepted().build());
+ return true;
+ }))
.build().target(URL).request();
try (Response response = builder.async()
.get(new TestInvocationCallback(a -> a.getStatus() == Response.Status.ACCEPTED.getStatusCode(), a -> false))
@@ -150,7 +162,11 @@
100)
.register(new CounterPostInvocationInterceptor(
(a, b) -> false,
- (a, b) -> { b.resolve(Response.ok().build()); b.resolve(Response.ok().build()); return true; }) {},
+ (a, b) -> {
+ b.resolve(Response.ok().build());
+ b.resolve(Response.ok().build());
+ return true;
+ }) {},
200)
.build().target(URL).request();
try (Response response = builder.get()) {
@@ -165,8 +181,11 @@
final Invocation.Builder builder = ClientBuilder.newBuilder()
.register(AbortRequestFilter.class)
.register(new CounterPostInvocationInterceptor(
- (a, b) -> { b.setStatus(Response.Status.CONFLICT.getStatusCode());
- b.setEntityStream(new ByteArrayInputStream("HELLO".getBytes())); return true; },
+ (a, b) -> {
+ b.setStatus(Response.Status.CONFLICT.getStatusCode());
+ b.setEntityStream(new ByteArrayInputStream("HELLO".getBytes()));
+ return true;
+ },
(a, b) -> false))
.build().target(URL).request();
try (Response response = builder.get()) {
@@ -181,11 +200,19 @@
final Invocation.Builder builder = ClientBuilder.newBuilder()
.register(new CounterPostInvocationInterceptor(
(a, b) -> false,
- (a, b) -> { b.getThrowables().clear(); return true; }) {},
+ (a, b) -> {
+ b.getThrowables().clear();
+ return true;
+ }) {
+ },
200)
.register(new CounterPostInvocationInterceptor(
(a, b) -> false,
- (a, b) -> { b.resolve(Response.accepted().build()); return true; }) {},
+ (a, b) -> {
+ b.resolve(Response.accepted().build());
+ return true;
+ }) {
+ },
300)
.build().target(URL).request();
try (Response response = builder.get()) {
@@ -212,10 +239,13 @@
public void testPreThrowsPostResolves() {
final Invocation.Builder builder = ClientBuilder.newBuilder()
.register(new CounterPreInvocationInterceptor(a -> { throw new IllegalArgumentException(); }) {})
- .register(new CounterPreInvocationInterceptor(a -> {throw new IllegalStateException(); }) {})
- .register(new CounterPostInvocationInterceptor((a, b) -> false, (a, b) -> {
- b.resolve(Response.accepted().build()); return b.getThrowables().size() == 2;
- }))
+ .register(new CounterPreInvocationInterceptor(a -> { throw new IllegalStateException(); }) {})
+ .register(new CounterPostInvocationInterceptor(
+ (a, b) -> false,
+ (a, b) -> {
+ b.resolve(Response.accepted().build());
+ return b.getThrowables().size() == 2;
+ }))
.build().target(URL).request();
try (Response response = builder.get()) {
Assert.assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatus());
diff --git a/core-client/src/test/java/org/glassfish/jersey/client/spi/PreInvocationInterceptorTest.java b/core-client/src/test/java/org/glassfish/jersey/client/spi/PreInvocationInterceptorTest.java
index 9a1f20c..b04a4f7 100644
--- a/core-client/src/test/java/org/glassfish/jersey/client/spi/PreInvocationInterceptorTest.java
+++ b/core-client/src/test/java/org/glassfish/jersey/client/spi/PreInvocationInterceptorTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -122,7 +122,10 @@
public void testPreInvocationInterceptorAbortWith() {
final Invocation.Builder builder = ClientBuilder.newBuilder()
.executorService(new CustomClientExecutorProvider().getExecutorService())
- .register(new PropertyPreInvocationInterceptor(a -> {a.abortWith(Response.noContent().build()); return true; }))
+ .register(new PropertyPreInvocationInterceptor(a -> {
+ a.abortWith(Response.noContent().build());
+ return true;
+ }))
.register(new PropertyRequestFilter(a -> {throw new IllegalStateException(); }))
.register(AbortRequestFilter.class).build().target(URL).request();
try (Response response = builder.get()) {
@@ -135,11 +138,17 @@
final Invocation.Builder builder = ClientBuilder.newBuilder()
.executorService(new CustomClientExecutorProvider().getExecutorService())
.register(
- new PropertyPreInvocationInterceptor(a -> {a.abortWith(Response.noContent().build()); return true; }){},
+ new PropertyPreInvocationInterceptor(a -> {
+ a.abortWith(Response.noContent().build());
+ return true;
+ }) {},
200
)
.register(
- new PropertyPreInvocationInterceptor(a -> {a.abortWith(Response.accepted().build()); return true; }){},
+ new PropertyPreInvocationInterceptor(a -> {
+ a.abortWith(Response.accepted().build());
+ return true;
+ }) {},
100
)
.register(new PropertyRequestFilter(a -> {throw new IllegalStateException(); }))
diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/JaxrsProviders.java b/core-common/src/main/java/org/glassfish/jersey/internal/JaxrsProviders.java
index 5b97317..81364a1 100644
--- a/core-common/src/main/java/org/glassfish/jersey/internal/JaxrsProviders.java
+++ b/core-common/src/main/java/org/glassfish/jersey/internal/JaxrsProviders.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -51,7 +51,7 @@
* <li>{@link Providers}</li>
* </ul>
*/
- public static class ProvidersConfigurator implements BootstrapConfigurator{
+ public static class ProvidersConfigurator implements BootstrapConfigurator {
@Override
public void init(InjectionManager injectionManager, BootstrapBag bootstrapBag) {
diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/util/JerseyPublisher.java b/core-common/src/main/java/org/glassfish/jersey/internal/util/JerseyPublisher.java
index d1016cd..4469e0b 100644
--- a/core-common/src/main/java/org/glassfish/jersey/internal/util/JerseyPublisher.java
+++ b/core-common/src/main/java/org/glassfish/jersey/internal/util/JerseyPublisher.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -417,7 +417,7 @@
}
}
- public enum PublisherStrategy{
+ public enum PublisherStrategy {
/**
* Blocking publisher strategy - tries to deliver to all subscribers regardless the cost.
*
diff --git a/core-common/src/main/java/org/glassfish/jersey/message/internal/MessagingBinders.java b/core-common/src/main/java/org/glassfish/jersey/message/internal/MessagingBinders.java
index d551327..8a665e0 100644
--- a/core-common/src/main/java/org/glassfish/jersey/message/internal/MessagingBinders.java
+++ b/core-common/src/main/java/org/glassfish/jersey/message/internal/MessagingBinders.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -154,11 +154,11 @@
private static final class EnabledProvidersBinder {
private enum Provider {
- DOMSOURCE ("javax.xml.transform.dom.DOMSource"),
- RENDEREDIMAGE ("java.awt.image.RenderedImage"),
- SAXSOURCE ("javax.xml.transform.sax.SAXSource"),
- SOURCE ("javax.xml.transform.Source"),
- STREAMSOURCE ("javax.xml.transform.stream.StreamSource");
+ DOMSOURCE("javax.xml.transform.dom.DOMSource"),
+ RENDEREDIMAGE("java.awt.image.RenderedImage"),
+ SAXSOURCE("javax.xml.transform.sax.SAXSource"),
+ SOURCE("javax.xml.transform.Source"),
+ STREAMSOURCE("javax.xml.transform.stream.StreamSource");
Provider(String className) {
this.className = className;
}
diff --git a/etc/config/checkstyle-verify.xml b/etc/config/checkstyle-verify.xml
index 8d4b1b3..0f94e4f 100644
--- a/etc/config/checkstyle-verify.xml
+++ b/etc/config/checkstyle-verify.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -28,16 +28,17 @@
<property name="eachLine" value="true"/>
</module>
+ <module name="LineLength">
+ <property name="max" value="130"/>
+ <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://|@see| \* |@link|TODO|@todo|@version"/>
+ <property name="fileExtensions" value="java"/>
+ </module>
+
<module name="TreeWalker">
<property name="tabWidth" value="4"/>
<module name="OuterTypeFilename"/>
- <module name="LineLength">
- <property name="max" value="130"/>
- <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://|@see| \* |@link|TODO|@todo|@version"/>
- </module>
-
<module name="AvoidStarImport"/>
<!--<module name="UnusedImports"/>-->
@@ -60,13 +61,18 @@
<property name="allowSingleLineStatement" value="true"/>
</module>
<module name="LeftCurly">
- <property name="maxLineLength" value="130"/>
+ <!-- without literal LAMBDA -->
+ <property name="tokens" value="ANNOTATION_DEF, CLASS_DEF, CTOR_DEF, ENUM_CONSTANT_DEF, ENUM_DEF,
+ INTERFACE_DEF, LITERAL_CASE, LITERAL_CATCH, LITERAL_DEFAULT,
+ LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF,
+ LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE,
+ METHOD_DEF, OBJBLOCK, STATIC_INIT" />
</module>
- <module name="RightCurly"/>
<module name="RightCurly">
<property name="option" value="alone"/>
+ <!-- without literal LITERAL_TRY, LITERAL_CATCH, LITERAL_IF -->
<property name="tokens"
- value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
+ value="LITERAL_FOR, LITERAL_WHILE, LITERAL_FINALLY, LITERAL_ELSE"/>
</module>
<module name="WhitespaceAround">
diff --git a/etc/config/checkstyle.xml b/etc/config/checkstyle.xml
index bb2c618..36a7def 100644
--- a/etc/config/checkstyle.xml
+++ b/etc/config/checkstyle.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -52,6 +52,7 @@
<property name="basedir" value="${basedir}"/>
-->
<property name="charset" value="UTF-8"/>
+ <property name="cacheFile" value="${checkstyle.cache.file}"/>
<!-- Checks that each Java package has a Javadoc file used for commenting. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
@@ -82,14 +83,13 @@
</module>-->
<module name="TreeWalker">
- <property name="cacheFile" value="${checkstyle.cache.file}"/>
<property name="tabWidth" value="4"/>
<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<module name="JavadocMethod">
<property name="scope" value="protected"/>
- <property name="allowUndeclaredRTE" value="true"/>
+ <!-- <property name="allowUndeclaredRTE" value="true"/>-->
</module>
<module name="JavadocType">
<property name="scope" value="protected"/>
diff --git a/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProvider.java b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProvider.java
index ba95c17..430ccb3 100644
--- a/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProvider.java
+++ b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018 Payara Foundation and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -354,7 +354,7 @@
}
private static AnnotatedConstructor<?> enrichedConstructor(final AnnotatedConstructor<?> ctor) {
- return new AnnotatedConstructor(){
+ return new AnnotatedConstructor() {
@Override
public Constructor getJavaMember() {
diff --git a/ext/cdi/jersey-cdi1x/src/test/java/org/glassfish/jersey/ext/cdi1x/internal/CdiUtilTest.java b/ext/cdi/jersey-cdi1x/src/test/java/org/glassfish/jersey/ext/cdi1x/internal/CdiUtilTest.java
index 0cdafe1..0f9fa51 100644
--- a/ext/cdi/jersey-cdi1x/src/test/java/org/glassfish/jersey/ext/cdi1x/internal/CdiUtilTest.java
+++ b/ext/cdi/jersey-cdi1x/src/test/java/org/glassfish/jersey/ext/cdi1x/internal/CdiUtilTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -54,8 +54,11 @@
CdiUtil.getBeanManager();
new Verifications() {{
- custom.getBeanManager(); times = 1;
- fallback.getBeanManager(); times = 0;
+ custom.getBeanManager();
+ times = 1;
+
+ fallback.getBeanManager();
+ times = 0;
}};
}
@@ -72,7 +75,8 @@
CdiUtil.getBeanManager();
new Verifications() {{
- fallback.getBeanManager(); times = 1;
+ fallback.getBeanManager();
+ times = 1;
}};
}
diff --git a/pom.xml b/pom.xml
index b77d2d1..4f3d057 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2077,8 +2077,8 @@
<cdi.api.version>1.1</cdi.api.version>
<commons-lang3.version>3.3.2</commons-lang3.version>
<config.version>1.2.1</config.version>
- <checkstyle.mvn.plugin.version>2.16</checkstyle.mvn.plugin.version>
- <checkstyle.version>6.8.1</checkstyle.version>
+ <checkstyle.mvn.plugin.version>3.1.0</checkstyle.mvn.plugin.version>
+ <checkstyle.version>8.28</checkstyle.version>
<easymock.version>3.3</easymock.version>
<ejb.version>3.2.5</ejb.version>
<gf.impl.version>5.1.0-RC2</gf.impl.version>
diff --git a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/EventsTest.java b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/EventsTest.java
index e642750..e47ba14 100644
--- a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/EventsTest.java
+++ b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/EventsTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -31,7 +31,7 @@
*
* @author Petr Bouda
*/
-public class EventsTest extends JerseyTest{
+public class EventsTest extends JerseyTest {
@Override
protected Application configure() {
diff --git a/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/common/FeatureConstraintTest.java b/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/common/FeatureConstraintTest.java
index 76a47dd..7ced318 100644
--- a/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/common/FeatureConstraintTest.java
+++ b/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/common/FeatureConstraintTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -68,7 +68,7 @@
{
increment = 100;
}
- };
+ }
@ConstrainedTo(RuntimeType.CLIENT)
public static class ClientConstrainedClassFeature implements Feature {
@@ -87,7 +87,7 @@
{
increment = 100;
}
- };
+ }
public static class ClientServerConstrainedClassFeature implements Feature {
protected int increment = 10;
@@ -107,7 +107,7 @@
{
increment = 100;
}
- };
+ }
@Path("/")
public static class PropagatedConfigResource {
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/Hk2Application.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/Hk2Application.java
index 3d1c29d..4676476 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/Hk2Application.java
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/Hk2Application.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -41,7 +41,7 @@
Hk2OldFashionedResource.class);
register(new Hk2ValidationInterceptor.Binder());
- register(new AbstractBinder(){
+ register(new AbstractBinder() {
@Override
protected void configure() {
diff --git a/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/CounterFilter.java b/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/CounterFilter.java
index ee9953b..fa86e61 100644
--- a/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/CounterFilter.java
+++ b/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/CounterFilter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -34,7 +34,7 @@
*/
@Provider
@Stateless
-public class CounterFilter implements ContainerResponseFilter{
+public class CounterFilter implements ContainerResponseFilter {
public static final String RequestCountHEADER = "Request-Count";
diff --git a/tests/integration/servlet-2.5-init-5/src/main/java/org/glassfish/jersey/tests/integration/servlet_25_init_5/Servlet25init5.java b/tests/integration/servlet-2.5-init-5/src/main/java/org/glassfish/jersey/tests/integration/servlet_25_init_5/Servlet25init5.java
index d9e43c7..d04a1be 100644
--- a/tests/integration/servlet-2.5-init-5/src/main/java/org/glassfish/jersey/tests/integration/servlet_25_init_5/Servlet25init5.java
+++ b/tests/integration/servlet-2.5-init-5/src/main/java/org/glassfish/jersey/tests/integration/servlet_25_init_5/Servlet25init5.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -26,7 +26,7 @@
* @author Pavel Bucek
*/
@ApplicationPath("application_path")
-public class Servlet25init5 extends Application{
+public class Servlet25init5 extends Application {
@Override
public Set<Class<?>> getClasses() {
diff --git a/tests/performance/test-cases/filter-dynamic/src/main/java/org/glassfish/jersey/tests/performance/filter/dynamic/JaxRsApplication.java b/tests/performance/test-cases/filter-dynamic/src/main/java/org/glassfish/jersey/tests/performance/filter/dynamic/JaxRsApplication.java
index 535120a..ea44a54 100644
--- a/tests/performance/test-cases/filter-dynamic/src/main/java/org/glassfish/jersey/tests/performance/filter/dynamic/JaxRsApplication.java
+++ b/tests/performance/test-cases/filter-dynamic/src/main/java/org/glassfish/jersey/tests/performance/filter/dynamic/JaxRsApplication.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -28,7 +28,7 @@
*/
public class JaxRsApplication extends Application {
- static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>(){
+ static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>() {
{
add(DynamicallyBoundFilterResource.class);
add(DynamicFilterFeature.class);
diff --git a/tests/performance/test-cases/filter-global/src/main/java/org/glassfish/jersey/tests/performance/filter/global/JaxRsApplication.java b/tests/performance/test-cases/filter-global/src/main/java/org/glassfish/jersey/tests/performance/filter/global/JaxRsApplication.java
index e11fafb..d1cb284 100644
--- a/tests/performance/test-cases/filter-global/src/main/java/org/glassfish/jersey/tests/performance/filter/global/JaxRsApplication.java
+++ b/tests/performance/test-cases/filter-global/src/main/java/org/glassfish/jersey/tests/performance/filter/global/JaxRsApplication.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -28,7 +28,7 @@
*/
public class JaxRsApplication extends Application {
- static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>(){
+ static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>() {
{
add(TextEntityResource.class);
add(GlobalFilter.class);
diff --git a/tests/performance/test-cases/filter-name/src/main/java/org/glassfish/jersey/tests/performance/filter/name/JaxRsApplication.java b/tests/performance/test-cases/filter-name/src/main/java/org/glassfish/jersey/tests/performance/filter/name/JaxRsApplication.java
index bdf11bb..0d7db3c 100644
--- a/tests/performance/test-cases/filter-name/src/main/java/org/glassfish/jersey/tests/performance/filter/name/JaxRsApplication.java
+++ b/tests/performance/test-cases/filter-name/src/main/java/org/glassfish/jersey/tests/performance/filter/name/JaxRsApplication.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -28,7 +28,7 @@
*/
public class JaxRsApplication extends Application {
- static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>(){
+ static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>() {
{
add(NameBoundFilterResource.class);
add(NameBoundFilter.class);
diff --git a/tests/performance/test-cases/interceptor-dynamic/src/main/java/org/glassfish/jersey/tests/performance/interceptor/dynamic/JaxRsApplication.java b/tests/performance/test-cases/interceptor-dynamic/src/main/java/org/glassfish/jersey/tests/performance/interceptor/dynamic/JaxRsApplication.java
index d6f5d0b..694dcea 100644
--- a/tests/performance/test-cases/interceptor-dynamic/src/main/java/org/glassfish/jersey/tests/performance/interceptor/dynamic/JaxRsApplication.java
+++ b/tests/performance/test-cases/interceptor-dynamic/src/main/java/org/glassfish/jersey/tests/performance/interceptor/dynamic/JaxRsApplication.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -28,7 +28,7 @@
*/
public class JaxRsApplication extends Application {
- static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>(){
+ static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>() {
{
add(DynamicallyBoundInterceptorResource.class);
add(DynamicInterceptorFeature.class);
diff --git a/tests/performance/test-cases/interceptor-global/src/main/java/org/glassfish/jersey/tests/performance/interceptor/global/JaxRsApplication.java b/tests/performance/test-cases/interceptor-global/src/main/java/org/glassfish/jersey/tests/performance/interceptor/global/JaxRsApplication.java
index c50a00a..5ec1e26 100644
--- a/tests/performance/test-cases/interceptor-global/src/main/java/org/glassfish/jersey/tests/performance/interceptor/global/JaxRsApplication.java
+++ b/tests/performance/test-cases/interceptor-global/src/main/java/org/glassfish/jersey/tests/performance/interceptor/global/JaxRsApplication.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -28,7 +28,7 @@
*/
public class JaxRsApplication extends Application {
- static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>(){
+ static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>() {
{
add(TextEntityResource.class);
add(CustomInterceptor.class);
diff --git a/tests/performance/test-cases/interceptor-name/src/main/java/org/glassfish/jersey/tests/performance/interceptor/name/JaxRsApplication.java b/tests/performance/test-cases/interceptor-name/src/main/java/org/glassfish/jersey/tests/performance/interceptor/name/JaxRsApplication.java
index f3df34b..42b7458 100644
--- a/tests/performance/test-cases/interceptor-name/src/main/java/org/glassfish/jersey/tests/performance/interceptor/name/JaxRsApplication.java
+++ b/tests/performance/test-cases/interceptor-name/src/main/java/org/glassfish/jersey/tests/performance/interceptor/name/JaxRsApplication.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -28,7 +28,7 @@
*/
public class JaxRsApplication extends Application {
- static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>(){
+ static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>() {
{
add(InterceptedByNameResource.class);
add(NameBoundInterceptor.class);
diff --git a/tests/performance/test-cases/mbw-custom-provider/src/main/java/org/glassfish/jersey/tests/performance/mbw/custom/JaxRsApplication.java b/tests/performance/test-cases/mbw-custom-provider/src/main/java/org/glassfish/jersey/tests/performance/mbw/custom/JaxRsApplication.java
index 49893f9..7f1b0b0 100644
--- a/tests/performance/test-cases/mbw-custom-provider/src/main/java/org/glassfish/jersey/tests/performance/mbw/custom/JaxRsApplication.java
+++ b/tests/performance/test-cases/mbw-custom-provider/src/main/java/org/glassfish/jersey/tests/performance/mbw/custom/JaxRsApplication.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -28,7 +28,7 @@
*/
public class JaxRsApplication extends Application {
- static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>(){
+ static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>() {
{
add(PersonResource.class);
add(PersonProvider.class);
diff --git a/tests/performance/test-cases/mbw-json-jackson/src/main/java/org/glassfish/jersey/tests/performance/mbw/json/JaxRsApplication.java b/tests/performance/test-cases/mbw-json-jackson/src/main/java/org/glassfish/jersey/tests/performance/mbw/json/JaxRsApplication.java
index cd1b3cb..4906be9 100644
--- a/tests/performance/test-cases/mbw-json-jackson/src/main/java/org/glassfish/jersey/tests/performance/mbw/json/JaxRsApplication.java
+++ b/tests/performance/test-cases/mbw-json-jackson/src/main/java/org/glassfish/jersey/tests/performance/mbw/json/JaxRsApplication.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -30,7 +30,7 @@
*/
public class JaxRsApplication extends Application {
- static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>(){
+ static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>() {
{
add(JsonEntityResource.class);
add(JacksonFeature.class);
diff --git a/tests/performance/test-cases/mbw-json-moxy/src/main/java/org/glassfish/jersey/tests/performance/mbw/json/JaxRsApplication.java b/tests/performance/test-cases/mbw-json-moxy/src/main/java/org/glassfish/jersey/tests/performance/mbw/json/JaxRsApplication.java
index 037101d..1ba686f 100644
--- a/tests/performance/test-cases/mbw-json-moxy/src/main/java/org/glassfish/jersey/tests/performance/mbw/json/JaxRsApplication.java
+++ b/tests/performance/test-cases/mbw-json-moxy/src/main/java/org/glassfish/jersey/tests/performance/mbw/json/JaxRsApplication.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -31,7 +31,7 @@
*/
public class JaxRsApplication extends Application {
- static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>(){
+ static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>() {
{
add(JsonEntityResource.class);
add(MoxyJsonFeature.class);
diff --git a/tests/performance/test-cases/mbw-xml-moxy/src/main/java/org/glassfish/jersey/tests/performance/mbw/xml/JaxRsApplication.java b/tests/performance/test-cases/mbw-xml-moxy/src/main/java/org/glassfish/jersey/tests/performance/mbw/xml/JaxRsApplication.java
index a10ccb0..1ecd688 100644
--- a/tests/performance/test-cases/mbw-xml-moxy/src/main/java/org/glassfish/jersey/tests/performance/mbw/xml/JaxRsApplication.java
+++ b/tests/performance/test-cases/mbw-xml-moxy/src/main/java/org/glassfish/jersey/tests/performance/mbw/xml/JaxRsApplication.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -30,7 +30,7 @@
*/
public class JaxRsApplication extends Application {
- static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>(){
+ static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>() {
{
add(XmlEntityResource.class);
add(MoxyXmlFeature.class);
diff --git a/tests/performance/test-cases/proxy-injection/src/main/java/org/glassfish/jersey/tests/performance/proxy/injection/JaxRsApplication.java b/tests/performance/test-cases/proxy-injection/src/main/java/org/glassfish/jersey/tests/performance/proxy/injection/JaxRsApplication.java
index 6b0faad..014b013 100644
--- a/tests/performance/test-cases/proxy-injection/src/main/java/org/glassfish/jersey/tests/performance/proxy/injection/JaxRsApplication.java
+++ b/tests/performance/test-cases/proxy-injection/src/main/java/org/glassfish/jersey/tests/performance/proxy/injection/JaxRsApplication.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -27,7 +27,7 @@
*/
public class JaxRsApplication extends Application {
- static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>(){
+ static final Set<Class<?>> APP_CLASSES = new HashSet<Class<?>>() {
{
add(FieldInjectedResource.class);
add(MethodInjectedResource.class);