Skip to content

Commit

Permalink
[FFM-9691] - Add support for Java 21 (#164)
Browse files Browse the repository at this point in the history
* [FFM-9691] - Add support for Java 21

What
Java 21 was released in Sep 2023 and is an LTS release.
Update the relevant files.

Why
The current version of the Java SDK uses some APIs which are now deprecated (via lombok) and causes the build to fail on latest JDK.

Testing
Manual
  • Loading branch information
andybharness authored Oct 25, 2023
1 parent fa7f496 commit ea328da
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
6 changes: 3 additions & 3 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.harness.featureflags</groupId>
<artifactId>examples</artifactId>
<version>1.3.0</version>
<version>1.3.1-SNAPSHOT</version>

<properties>
<maven.compiler.source>8</maven.compiler.source>
Expand All @@ -33,13 +33,13 @@
<dependency>
<groupId>io.harness</groupId>
<artifactId>ff-java-server-sdk</artifactId>
<version>1.3.0</version>
<version>1.3.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>

Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.harness</groupId>
<artifactId>ff-java-server-sdk</artifactId>
<version>1.3.0</version>
<version>1.3.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Harness Feature Flag Java Server SDK</name>
<description>Harness Feature Flag Java Server SDK</description>
Expand Down Expand Up @@ -107,7 +107,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -263,7 +263,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<version>3.4.0</version>
<executions>
<execution>
<id>add-source</id>
Expand Down
10 changes: 3 additions & 7 deletions src/main/java/io/harness/cf/client/connector/FileWatcher.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.harness.cf.client.connector;

import com.sun.nio.file.SensitivityWatchEventModifier;
import io.harness.cf.client.common.StringUtils;
import io.harness.cf.client.dto.Message;
import java.io.IOException;
Expand All @@ -26,12 +25,9 @@ public FileWatcher(
watcher = FileSystems.getDefault().newWatchService();
path.register(
watcher,
new WatchEvent.Kind[] {
StandardWatchEventKinds.ENTRY_CREATE,
StandardWatchEventKinds.ENTRY_DELETE,
StandardWatchEventKinds.ENTRY_MODIFY
},
SensitivityWatchEventModifier.HIGH);
StandardWatchEventKinds.ENTRY_CREATE,
StandardWatchEventKinds.ENTRY_DELETE,
StandardWatchEventKinds.ENTRY_MODIFY);
log.info("FileWatcher initialized with path {}/{}", path, domain);
}

Expand Down

0 comments on commit ea328da

Please sign in to comment.