Skip to content

Commit 1935c5c

Browse files
authored
Update to latest jdk (#171)
* many version updates
1 parent 3722bf9 commit 1935c5c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+292
-117
lines changed

.jdkw

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
JDKW_RELEASE=latest
22
JDKW_DIST=zulu
3-
JDKW_BUILD=8.38.0.13
4-
JDKW_VERSION=8.0.212
3+
JDKW_BUILD=17.36.13-ca
4+
JDKW_VERSION=17.0.4

maven/maven-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
#Fri May 08 03:14:08 UTC 2020
33
checksumAlgorithm=SHA1
44
verifyDownload=true
5-
distributionUrl=https\://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
5+
distributionUrl=https\://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip

pom.xml

Lines changed: 59 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<parent>
1919
<groupId>com.arpnetworking.build</groupId>
2020
<artifactId>arpnetworking-parent-pom</artifactId>
21-
<version>2.0.10</version>
21+
<version>3.0.8</version>
2222
<relativePath />
2323
</parent>
2424

@@ -106,23 +106,25 @@
106106
<akka.persistence.cassandra.version>0.105</akka.persistence.cassandra.version>
107107
<apache.httpclient.version>4.5.2</apache.httpclient.version>
108108
<apache.httpcore.version>4.4.5</apache.httpcore.version>
109-
<arpnetworking.commons.version>1.20.0</arpnetworking.commons.version>
110-
<aspectjrt.version>1.9.1</aspectjrt.version>
109+
<arpnetworking.commons.version>2.0.3</arpnetworking.commons.version>
110+
<aspectjrt.version>1.9.9.1</aspectjrt.version>
111111
<asynchttpclient.version>2.0.38</asynchttpclient.version>
112-
<cglib.version>3.2.5</cglib.version>
112+
<cglib.version>3.3.0</cglib.version>
113113
<commons.codec.version>1.10</commons.codec.version>
114-
<ebean.version>6.8.1</ebean.version>
115-
<flyway.version>3.2.1</flyway.version>
116-
<guava.version>23.4-jre</guava.version>
117-
<guice.version>4.1.0</guice.version>
114+
<ebean.version>13.7.0</ebean.version>
115+
<ebean.annotation.version>8.2</ebean.annotation.version>
116+
<flyway.version>9.1.2</flyway.version>
117+
<guava.version>31.1-jre</guava.version>
118+
<guice.version>5.1.0</guice.version>
118119
<hamcrest.version>2.0.0.0</hamcrest.version>
119120
<hikari.version>2.5.1</hikari.version>
120121
<fastutil.version>8.3.1</fastutil.version>
121-
<h2.version>1.4.193</h2.version>
122+
<h2.version>2.1.214</h2.version>
122123
<jackson.version>2.9.8</jackson.version>
123124
<javassist.version>3.22.0-GA</javassist.version>
124125
<javassist.maven.core.version>0.2.1</javassist.maven.core.version>
125126
<javax.persistence.version>1.0.2</javax.persistence.version>
127+
<javax.xml.version>2.3.1</javax.xml.version>
126128
<jsr305.version>3.0.2</jsr305.version>
127129
<junit.version>4.12</junit.version>
128130
<junitparams.version>1.0.5</junitparams.version>
@@ -136,11 +138,11 @@
136138
<metrics.jvm.extra.version>0.11.2</metrics.jvm.extra.version>
137139
<metrics.http.extra.version>0.11.2</metrics.http.extra.version>
138140
<metrics.aggregator.protocol.version>1.0.10</metrics.aggregator.protocol.version>
139-
<mockito.version>2.12.0</mockito.version>
141+
<mockito.version>4.6.1</mockito.version>
140142
<netty.version>4.0.56.Final</netty.version>
141143
<netty.all.version>4.0.21.Final</netty.all.version>
142144
<ning.http.client.version>1.9.31</ning.http.client.version>
143-
<oval.version>1.90</oval.version>
145+
<oval.version>3.2.1</oval.version>
144146
<play.ws.version>1.1.2</play.ws.version>
145147
<postgresql.version>9.4-1202-jdbc42</postgresql.version>
146148
<protobuf.version>3.10.0</protobuf.version>
@@ -153,14 +155,14 @@
153155
<spotbugs.annotations.version>3.1.12</spotbugs.annotations.version>
154156
<typesafe.config.version>1.3.1</typesafe.config.version>
155157
<typesafe.ssl.config.version>0.2.2</typesafe.ssl.config.version>
156-
<wiremock.version>2.12.0</wiremock.version>
158+
<wiremock.version>2.27.2</wiremock.version>
157159

158160
<!--Plugin versions-->
159-
<avaje.ebeanorm.mavenenhancer.version>4.7.1</avaje.ebeanorm.mavenenhancer.version>
160-
<aspectjtools.maven.plugin>1.9.1</aspectjtools.maven.plugin>
161-
<aspectj.maven.plugin.version>1.11</aspectj.maven.plugin.version>
161+
<avaje.ebeanorm.mavenenhancer.version>13.7.0</avaje.ebeanorm.mavenenhancer.version>
162+
<aspectjtools.maven.plugin>1.9.9.1</aspectjtools.maven.plugin>
163+
<aspectj.maven.plugin.version>1.14.0</aspectj.maven.plugin.version>
162164
<docker.maven.plugin.version>0.27.2</docker.maven.plugin.version>
163-
<javassist.maven.plugin.version>0.1.2</javassist.maven.plugin.version>
165+
<javassist.maven.plugin.version>0.2.5</javassist.maven.plugin.version>
164166
<maven.assembly.plugin.version>3.3.0</maven.assembly.plugin.version>
165167
<rpm.maven.plugin.version>2.1.5</rpm.maven.plugin.version>
166168

@@ -304,8 +306,8 @@
304306
</configuration>
305307
</plugin>
306308
<plugin>
307-
<groupId>org.avaje.ebeanorm</groupId>
308-
<artifactId>avaje-ebeanorm-mavenenhancer</artifactId>
309+
<groupId>io.ebean</groupId>
310+
<artifactId>ebean-maven-plugin</artifactId>
309311
<version>${avaje.ebeanorm.mavenenhancer.version}</version>
310312
<configuration>
311313
<packages>com.arpnetworking.clusteraggregator.models.ebean.**</packages>
@@ -393,14 +395,14 @@
393395
<execution>
394396
<goals>
395397
<goal>compile</goal>
396-
<goal>test-compile</goal>
398+
<!-- <goal>test-compile</goal>-->
397399
</goals>
398400
</execution>
399401
</executions>
400402
<configuration>
401-
<source>1.8</source>
402-
<target>1.8</target>
403-
<complianceLevel>1.8</complianceLevel>
403+
<source>17</source>
404+
<target>17</target>
405+
<complianceLevel>17</complianceLevel>
404406
<aspectLibraries>
405407
<aspectLibrary>
406408
<groupId>com.arpnetworking.logback</groupId>
@@ -541,6 +543,23 @@
541543
</execution>
542544
</executions>
543545
</plugin>
546+
<plugin>
547+
<groupId>org.apache.maven.plugins</groupId>
548+
<artifactId>maven-compiler-plugin</artifactId>
549+
<configuration>
550+
<source>17</source>
551+
<target>17</target>
552+
</configuration>
553+
</plugin>
554+
<plugin>
555+
<groupId>org.apache.maven.plugins</groupId>
556+
<artifactId>maven-dependency-plugin</artifactId>
557+
<configuration>
558+
<ignoredUnusedDeclaredDependencies>
559+
<ignoredUnusedDeclaredDependency>io.ebean:ebean:jar:${ebean.version}</ignoredUnusedDeclaredDependency>
560+
</ignoredUnusedDeclaredDependencies>
561+
</configuration>
562+
</plugin>
544563
</plugins>
545564
</build>
546565

@@ -626,7 +645,7 @@
626645
<dependency>
627646
<groupId>com.google.errorprone</groupId>
628647
<artifactId>error_prone_annotations</artifactId>
629-
<version>2.0.18</version>
648+
<version>2.15.0</version>
630649
<scope>provided</scope>
631650
</dependency>
632651
<dependency>
@@ -762,10 +781,20 @@
762781
<version>${javax.persistence.version}</version>
763782
</dependency>
764783
<dependency>
765-
<groupId>org.avaje.ebeanorm</groupId>
766-
<artifactId>avaje-ebeanorm</artifactId>
784+
<groupId>io.ebean</groupId>
785+
<artifactId>ebean</artifactId>
786+
<version>${ebean.version}</version>
787+
</dependency>
788+
<dependency>
789+
<groupId>io.ebean</groupId>
790+
<artifactId>ebean-api</artifactId>
767791
<version>${ebean.version}</version>
768792
</dependency>
793+
<dependency>
794+
<groupId>io.ebean</groupId>
795+
<artifactId>ebean-annotation</artifactId>
796+
<version>${ebean.annotation.version}</version>
797+
</dependency>
769798
<dependency>
770799
<groupId>org.flywaydb</groupId>
771800
<artifactId>flyway-core</artifactId>
@@ -820,6 +849,11 @@
820849
<version>${javassist.version}</version>
821850
<scope>runtime</scope>
822851
</dependency>
852+
<dependency>
853+
<groupId>javax.xml.ws</groupId>
854+
<artifactId>jaxws-api</artifactId>
855+
<version>${javax.xml.version}</version>
856+
</dependency>
823857
<dependency>
824858
<groupId>com.arpnetworking.commons</groupId>
825859
<artifactId>javassist-maven-core</artifactId>

spotbugs.exclude.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222
http://findbugs.sourceforge.net/bugDescriptions.html#DLS_DEAD_LOCAL_STORE
2323
-->
2424
<Match>
25-
<Bug pattern="DLS_DEAD_LOCAL_STORE" />
25+
<Or>
26+
<Bug pattern="DLS_DEAD_LOCAL_STORE" />
27+
<Bug pattern="EI_EXPOSE_REP"/>
28+
<Bug pattern="EI_EXPOSE_REP2"/>
29+
</Or>
2630
</Match>
2731

2832
<!-- Match all RV_RETURN_VALUE_IGNORED_BAD_PRACTICE violations on all unit
@@ -51,6 +55,8 @@
5155
<Bug pattern="SE_NO_SERIALVERSIONID" />
5256
<Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED" />
5357
<Bug pattern="CI_CONFUSED_INHERITANCE" />
58+
<Bug pattern="MS_SHOULD_BE_FINAL" />
59+
<Bug pattern="NP_NONNULL_PARAM_VIOLATION" />
5460
</Or>
5561
<Or>
5662
<Class name="~com\.arpnetworking\.clusteraggregator\.models\.ebean.*" />

src/main/docker/Dockerfile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM openjdk:8u212-jre-slim-buster
15+
FROM openjdk:17-slim-bullseye
1616

1717
MAINTAINER arpnetworking
1818

@@ -58,16 +58,19 @@ CMD [ \
5858
"${LOGBACK_CONFIG}", \
5959
"-XX:+HeapDumpOnOutOfMemoryError", \
6060
"-XX:HeapDumpPath=/opt/cluster-aggregator/logs/cluster-aggregator.oom.hprof", \
61-
"-XX:+PrintGCDetails", \
62-
"-XX:+PrintGCDateStamps", \
63-
"-Xloggc:/opt/cluster-aggregator/logs/cluster-aggregator.gc.log", \
64-
"-XX:NumberOfGCLogFiles=2", \
65-
"-XX:GCLogFileSize=50M", \
66-
"-XX:+UseGCLogFileRotation", \
61+
"-Xlog:gc*:file=/opt/cluster-aggregator/logs/cluster-aggregator.gc.log:time,level,tags:filecount=2,filesize=50M", \
6762
"-Xms${JVM_XMS}", \
6863
"-Xmx${JVM_XMX}", \
6964
"-XX:+UseStringDeduplication", \
7065
"-XX:+UseG1GC", \
7166
"-Duser.timezone=UTC", \
67+
"--add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED", \
68+
"--add-opens=java.base/java.lang=ALL-UNNAMED", \
69+
"--add-opens=java.base/java.lang.invoke=ALL-UNNAMED", \
70+
"--add-opens=java.base/java.io=ALL-UNNAMED", \
71+
"--add-opens=java.base/java.security=ALL-UNNAMED", \
72+
"--add-opens=java.base/java.util=ALL-UNNAMED", \
73+
"--add-opens=java.management/javax.management=ALL-UNNAMED", \
74+
"--add-opens=java.naming/javax.naming=ALL-UNNAMED", \
7275
"--", \
7376
"${CAGG_CONFIG}" ]

src/main/java/com/arpnetworking/clusteraggregator/GracefulShutdownActor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import com.arpnetworking.steno.LoggerFactory;
2626
import com.google.inject.Inject;
2727
import com.google.inject.name.Named;
28+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
2829

2930
/**
3031
* Shuts down the Akka cluster gracefully.
@@ -38,6 +39,7 @@ public class GracefulShutdownActor extends AbstractActor {
3839
* @param shardRegion aggregator shard region
3940
*/
4041
@Inject
42+
@SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "Context is safe to use in constructor.")
4143
public GracefulShutdownActor(@Named("aggregator-shard-region") final ActorRef shardRegion) {
4244
_shardRegion = shardRegion;
4345
_cluster = Cluster.get(context().system());

src/main/java/com/arpnetworking/clusteraggregator/Status.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import com.arpnetworking.steno.Logger;
3030
import com.arpnetworking.steno.LoggerFactory;
3131
import com.arpnetworking.utility.CastMapper;
32+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
3233

3334
import java.time.Duration;
3435
import java.util.Map;
@@ -56,6 +57,7 @@ public class Status extends AbstractActor {
5657
* @param clusterStatusCache The actor holding the cached cluster status.
5758
* @param localMetrics The actor holding the local node metrics.
5859
*/
60+
@SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "context is safe to be used in constructors")
5961
public Status(
6062
final Cluster cluster,
6163
final ActorRef clusterStatusCache,

src/main/java/com/arpnetworking/clusteraggregator/aggregation/AggregationRouter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import com.google.common.collect.ImmutableSet;
2828
import com.google.inject.Inject;
2929
import com.google.inject.name.Named;
30+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
3031

3132
import java.io.Serializable;
3233
import java.time.Duration;
@@ -82,6 +83,7 @@ public static Props props(
8283
* @param periodicMetrics The {@link PeriodicMetrics} instance.
8384
*/
8485
@Inject
86+
@SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "context is safe to be used in constructors")
8587
public AggregationRouter(
8688
@Named("periodic-statistics") final ActorRef periodicStatistics,
8789
@Named("cluster-emitter") final ActorRef emitter,

src/main/java/com/arpnetworking/clusteraggregator/aggregation/StreamingAggregator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import com.google.common.collect.Lists;
3636
import com.google.inject.Inject;
3737
import com.google.inject.name.Named;
38+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
3839
import scala.concurrent.duration.FiniteDuration;
3940

4041
import java.io.Serializable;
@@ -99,6 +100,7 @@ public static Props props(
99100
* @param periodicMetrics The {@link PeriodicMetrics} instance.
100101
*/
101102
@Inject
103+
@SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "context is safe to be used in constructors")
102104
public StreamingAggregator(
103105
@Named("periodic-statistics") final ActorRef periodicStatistics,
104106
@Named("cluster-emitter") final ActorRef emitter,

src/main/java/com/arpnetworking/clusteraggregator/client/AggClientConnection.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import com.google.common.collect.ImmutableList;
3737
import com.google.common.collect.ImmutableMap;
3838
import com.google.protobuf.GeneratedMessageV3;
39+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
3940
import scala.concurrent.duration.FiniteDuration;
4041

4142
import java.net.InetSocketAddress;
@@ -77,6 +78,7 @@ public static Props props(
7778
* @param maxConnectionAge The maximum duration to keep a connection open before cycling it.
7879
* @param calculateAggregates True to compute cluster aggregations, false to only publish host aggregations
7980
*/
81+
@SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "context is safe to be used in constructors")
8082
public AggClientConnection(
8183
final ActorRef connection,
8284
final InetSocketAddress remote,
@@ -86,7 +88,7 @@ public AggClientConnection(
8688
_remoteAddress = remote;
8789
_calculateAggregates = calculateAggregates;
8890

89-
getContext().watch(connection);
91+
context().watch(connection);
9092

9193
context().system().scheduler().scheduleOnce(
9294
maxConnectionAge,

0 commit comments

Comments
 (0)