Skip to content

Commit be327d2

Browse files
authored
Merge pull request #3125 from codefromthecrypt/java-ll
Updates to minimum Java 11
2 parents ecba04a + 3fa93d2 commit be327d2

File tree

11 files changed

+20
-16
lines changed

11 files changed

+20
-16
lines changed

extended/pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@
114114
<groupId>org.apache.maven.plugins</groupId>
115115
<artifactId>maven-compiler-plugin</artifactId>
116116
<configuration>
117-
<source>8</source>
118-
<target>8</target>
117+
<release>${java.version}</release>
119118
</configuration>
120119
</plugin>
121120
</plugins>

extended/src/main/java/io/kubernetes/client/extended/event/legacy/LegacyEventBroadcaster.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public void shutdown() {
121121
private void recordToSink(CoreV1Event event) throws InterruptedException {
122122
Optional<MutablePair<CoreV1Event, V1Patch>> eventAndPatch =
123123
this.eventCorrelator.correlate(event);
124-
if (!eventAndPatch.isPresent()) {
124+
if (eventAndPatch.isEmpty()) {
125125
// skip
126126
return;
127127
}

extended/src/test/java/io/kubernetes/client/extended/event/EventCorrelatorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public void testEventCorrelate() throws InterruptedException {
163163
event.setFirstTimestamp(now);
164164
event.setLastTimestamp(now);
165165
Optional<MutablePair<CoreV1Event, V1Patch>> result = correlator.correlate(event);
166-
if (!result.isPresent()) {
166+
if (result.isEmpty()) {
167167
correlator.updateState(event);
168168
}
169169
}
@@ -173,7 +173,7 @@ public void testEventCorrelate() throws InterruptedException {
173173
newEvent.setLastTimestamp(now);
174174
Optional<MutablePair<CoreV1Event, V1Patch>> result = correlator.correlate(newEvent);
175175

176-
assertEquals(expectedSkip, !result.isPresent());
176+
assertEquals(expectedSkip, result.isEmpty());
177177
if (!expectedSkip) {
178178
CoreV1Event correlatedEvent = result.get().getLeft();
179179
correlatedEvent.setMetadata(new V1ObjectMetaBuilder().withName("").withNamespace("").build());

kubernetes/pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@
114114
</execution>
115115
</executions>
116116
<configuration>
117+
<!-- TODO: workaround until openapi stops generating a dependency on
118+
the un-exported module: com.google.gson.internal.bind.util -->
119+
<legacyMode>true</legacyMode>
117120
<tags>
118121
<tag>
119122
<name>http.response.details</name>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
</scm>
3737

3838
<properties>
39-
<java.version>1.8</java.version>
39+
<java.version>11</java.version>
4040
<maven.compiler.source>${java.version}</maven.compiler.source>
4141
<maven.compiler.target>${java.version}</maven.compiler.target>
4242
<maven-plugin-version>1.0.0</maven-plugin-version>

proto/pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
<groupId>org.apache.maven.plugins</groupId>
3535
<artifactId>maven-compiler-plugin</artifactId>
3636
<configuration>
37-
<source>8</source>
38-
<target>8</target>
37+
<release>${java.version}</release>
3938
</configuration>
4039
</plugin>
4140
</plugins>

spring-aot/pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
</parent>
1515
<properties>
1616
<spring.boot.version>3.0.0</spring.boot.version>
17+
<!-- Spring Boot 3.x is minimum JRE 17 -->
18+
<java.version>17</java.version>
1719
</properties>
1820
<dependencies>
1921
<dependency>
@@ -66,8 +68,7 @@
6668
<groupId>org.apache.maven.plugins</groupId>
6769
<artifactId>maven-compiler-plugin</artifactId>
6870
<configuration>
69-
<source>17</source>
70-
<target>17</target>
71+
<release>${java.version}</release>
7172
</configuration>
7273
</plugin>
7374
</plugins>

spring/pom.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
<relativePath>../pom.xml</relativePath>
1414
</parent>
1515

16+
<properties>
17+
<!-- Spring Boot 3.x is minimum JRE 17 -->
18+
<java.version>17</java.version>
19+
</properties>
1620

1721
<dependencies>
1822
<dependency>
@@ -91,8 +95,7 @@
9195
<groupId>org.apache.maven.plugins</groupId>
9296
<artifactId>maven-compiler-plugin</artifactId>
9397
<configuration>
94-
<source>8</source>
95-
<target>8</target>
98+
<release>${java.version}</release>
9699
</configuration>
97100
</plugin>
98101
</plugins>

util/pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@
140140
<groupId>org.apache.maven.plugins</groupId>
141141
<artifactId>maven-compiler-plugin</artifactId>
142142
<configuration>
143-
<source>8</source>
144-
<target>8</target>
143+
<release>${java.version}</release>
145144
</configuration>
146145
</plugin>
147146
</plugins>

util/src/main/java/io/kubernetes/client/Discovery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public Set<APIResource> groupResourcesByName(
9797
// parse raw discovery responses to APIResource for better readability
9898
Set<APIResource> resources =
9999
resourceList.getResources().stream()
100-
.filter(r -> !getSubResourceNameIfPossible(r.getName()).isPresent())
100+
.filter(r -> getSubResourceNameIfPossible(r.getName()).isEmpty())
101101
.map(
102102
r ->
103103
new APIResource(

0 commit comments

Comments
 (0)