From 26518589425ffedea5c0204295c9a74455f79d64 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Sep 2025 19:23:07 +0000 Subject: [PATCH 01/11] Bump org.sonatype.central:central-publishing-maven-plugin Bumps [org.sonatype.central:central-publishing-maven-plugin](https://github.com/sonatype/central-publishing-maven-plugin) from 0.7.0 to 0.9.0. - [Commits](https://github.com/sonatype/central-publishing-maven-plugin/commits) --- updated-dependencies: - dependency-name: org.sonatype.central:central-publishing-maven-plugin dependency-version: 0.9.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9ab1b77..3577610 100644 --- a/pom.xml +++ b/pom.xml @@ -178,7 +178,7 @@ org.sonatype.central central-publishing-maven-plugin - 0.7.0 + 0.9.0 true central From aaaa232f5f94f6e564dacf7016f7a69f70662edf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Sep 2025 19:28:43 +0000 Subject: [PATCH 02/11] Bump io.split.client:java-client from 4.17.0 to 4.18.1 Bumps [io.split.client:java-client](https://github.com/splitio/java-client) from 4.17.0 to 4.18.1. - [Changelog](https://github.com/splitio/java-client/blob/master/CHANGES.txt) - [Commits](https://github.com/splitio/java-client/compare/4.17.0...4.18.1) --- updated-dependencies: - dependency-name: io.split.client:java-client dependency-version: 4.18.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9ab1b77..0d8efa6 100644 --- a/pom.xml +++ b/pom.xml @@ -47,7 +47,7 @@ io.split.client java-client - 4.17.0 + 4.18.1 org.apache.httpcomponents From e34809a6d5297a1298631caa388edda80ce10c1d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Oct 2025 16:13:12 +0000 Subject: [PATCH 03/11] Bump dev.openfeature:sdk from 1.17.0 to 1.18.1 Bumps [dev.openfeature:sdk](https://github.com/open-feature/java-sdk) from 1.17.0 to 1.18.1. - [Release notes](https://github.com/open-feature/java-sdk/releases) - [Changelog](https://github.com/open-feature/java-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-feature/java-sdk/compare/v1.17.0...v1.18.1) --- updated-dependencies: - dependency-name: dev.openfeature:sdk dependency-version: 1.18.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0d8efa6..42ebc1a 100644 --- a/pom.xml +++ b/pom.xml @@ -63,7 +63,7 @@ dev.openfeature sdk - 1.17.0 + 1.18.1 com.fasterxml.jackson.core From 87fa64c3a9e57ce00a45a75258381978eae9e55e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Oct 2025 16:15:06 +0000 Subject: [PATCH 04/11] Bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.3 to 3.5.4 Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.5.3 to 3.5.4. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.3...surefire-3.5.4) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-version: 3.5.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c184b68..943fe9c 100644 --- a/pom.xml +++ b/pom.xml @@ -96,7 +96,7 @@ maven-surefire-plugin - 3.5.3 + 3.5.4 maven-jar-plugin From 3c808036d1b5747f23249687c55d7dc94f9b6234 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Oct 2025 19:24:02 +0000 Subject: [PATCH 05/11] Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.3 to 3.12.0 Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.11.3 to 3.12.0. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.11.3...maven-javadoc-plugin-3.12.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-version: 3.12.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a78e0bd..11f8ce5 100644 --- a/pom.xml +++ b/pom.xml @@ -134,7 +134,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.11.3 + 3.12.0 attach-javadocs From 285189e642076ed2996b67ed3206ee1e74c61043 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Oct 2025 19:24:14 +0000 Subject: [PATCH 06/11] Bump org.mockito:mockito-core from 5.19.0 to 5.20.0 Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.19.0 to 5.20.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v5.19.0...v5.20.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-version: 5.20.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a78e0bd..82b55b3 100644 --- a/pom.xml +++ b/pom.xml @@ -57,7 +57,7 @@ org.mockito mockito-core - 5.19.0 + 5.20.0 test From 7685575ab7b4ebc8a7700d0d0c8632e4f28bfbdc Mon Sep 17 00:00:00 2001 From: Emmanuel Zamora Date: Fri, 3 Oct 2025 20:45:27 -0300 Subject: [PATCH 07/11] [FME-10341] fix vulns, update versions and add shutdown --- pom.xml | 31 ++++++++++--------- .../io/split/openfeature/SplitProvider.java | 5 +++ .../openfeature/utils/Serialization.java | 14 +++------ .../java/io/split/openfeature/ClientTest.java | 12 +++++-- .../split/openfeature/SplitProviderTest.java | 16 +++++++--- 5 files changed, 47 insertions(+), 31 deletions(-) diff --git a/pom.xml b/pom.xml index a78e0bd..c54cb78 100644 --- a/pom.xml +++ b/pom.xml @@ -49,11 +49,6 @@ java-client 4.18.1 - - org.apache.httpcomponents - httpclient - 4.5.14 - org.mockito mockito-core @@ -65,16 +60,6 @@ sdk 1.18.1 - - com.fasterxml.jackson.core - jackson-core - 2.20.0 - - - com.fasterxml.jackson.core - jackson-databind - 2.20.0 - @@ -85,6 +70,22 @@ maven-clean-plugin 3.5.0 + + org.owasp + dependency-check-maven + 12.1.6 + + 41aa3456-48f3-466a-a8ea-db1e84caba36 + 7 + + + + + check + + + + maven-resources-plugin diff --git a/src/main/java/io/split/openfeature/SplitProvider.java b/src/main/java/io/split/openfeature/SplitProvider.java index 06982d3..67c43cf 100644 --- a/src/main/java/io/split/openfeature/SplitProvider.java +++ b/src/main/java/io/split/openfeature/SplitProvider.java @@ -158,6 +158,11 @@ public Map transformContext(EvaluationContext context) { return context.asObjectMap(); } + @Override + public void shutdown() { + client.destroy(); + } + private SplitResult evaluateTreatment(String key, EvaluationContext evaluationContext) { String id = evaluationContext.getTargetingKey(); if (id == null || id.isEmpty()) { diff --git a/src/main/java/io/split/openfeature/utils/Serialization.java b/src/main/java/io/split/openfeature/utils/Serialization.java index d3f23f6..5ff2c04 100644 --- a/src/main/java/io/split/openfeature/utils/Serialization.java +++ b/src/main/java/io/split/openfeature/utils/Serialization.java @@ -1,12 +1,10 @@ package io.split.openfeature.utils; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.Map; + import dev.openfeature.sdk.ErrorCode; import dev.openfeature.sdk.exceptions.ParseError; - -import java.util.Map; +import io.split.client.utils.Json; public class Serialization { @@ -15,10 +13,8 @@ private Serialization() { public static Map stringToMap(final String obj) { try { - return new ObjectMapper() - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) - .readValue(obj, Map.class); - } catch (JsonProcessingException e) { + return Json.fromJson(obj, Map.class); + } catch (Exception e) { throw new ParseError(ErrorCode.PARSE_ERROR.name()); } } diff --git a/src/test/java/io/split/openfeature/ClientTest.java b/src/test/java/io/split/openfeature/ClientTest.java index a0ec342..9dd966a 100644 --- a/src/test/java/io/split/openfeature/ClientTest.java +++ b/src/test/java/io/split/openfeature/ClientTest.java @@ -30,14 +30,15 @@ public class ClientTest { OpenFeatureAPI openFeatureAPI; Client client; + SplitClient splitClient; @BeforeEach public void init() { openFeatureAPI = OpenFeatureAPI.getInstance(); try { SplitClientConfig config = SplitClientConfig.builder().splitFile("src/test/resources/split.yaml").build(); - SplitClient client = SplitFactoryBuilder.build("localhost", config).client(); - openFeatureAPI.setProviderAndWait(new SplitProvider(client)); + splitClient = SplitFactoryBuilder.build("localhost", config).client(); + openFeatureAPI.setProviderAndWait(new SplitProvider(splitClient)); } catch (URISyntaxException | IOException e) { System.out.println("Unexpected Exception occurred initializing Split Provider."); } @@ -267,6 +268,13 @@ public void getObjectFailTest() { assertNull(details.getVariant()); } + @Test + public void destroySplitClientTest() { + assertEquals("32", splitClient.getTreatment("key","int_feature")); + openFeatureAPI.shutdown(); + assertEquals("control", splitClient.getTreatment("key","int_feature")); + } + private Value mapToValue(Map map) { return new Value(new MutableStructure(map)); } diff --git a/src/test/java/io/split/openfeature/SplitProviderTest.java b/src/test/java/io/split/openfeature/SplitProviderTest.java index d5c0dc8..c72f124 100644 --- a/src/test/java/io/split/openfeature/SplitProviderTest.java +++ b/src/test/java/io/split/openfeature/SplitProviderTest.java @@ -420,27 +420,26 @@ public void evalStructureComplexTest() { Instant instant = Instant.ofEpochMilli(1665698754828L); Value treatment = mapToValue(Map.of( "string", new Value("blah"), - "int", new Value(10), + "int", new Value(10D), "double", new Value(100D), "bool", new Value(true), "struct", mapToValue(Map.of( "foo", new Value("bar"), - "baz", new Value(10), + "baz", new Value(10D), "innerMap", mapToValue(Map.of( "aa", new Value("bb"))))), "list", new Value( List.of( - new Value(1), new Value(true), mapToValue(Map.of( "cc", new Value("dd") )), mapToValue(Map.of( - "ee", new Value(1) + "ee", new Value(1D) )))), "dateTime", new Value(instant) )); - String treatmentAsString = "{\"string\":\"blah\",\"int\":10,\"double\":100.0,\"bool\":true, \"struct\":{\"foo\":\"bar\",\"baz\":10,\"innerMap\":{\"aa\":\"bb\"}},\"list\":[1,true,{\"cc\":\"dd\"},{\"ee\":1}],\"dateTime\":\"2022-10-13T22:05:54.828Z\"}"; + String treatmentAsString = "{\"string\":\"blah\",\"int\":10,\"double\":100.0,\"bool\":true, \"struct\":{\"foo\":\"bar\",\"baz\":10,\"innerMap\":{\"aa\":\"bb\"}},\"list\":[true,{\"cc\":\"dd\"},{\"ee\":1}],\"dateTime\":\"2022-10-13T22:05:54.828Z\"}"; when(mockSplitClient.getTreatmentWithConfig(eq(key), eq(flagName), anyMap())).thenReturn(new SplitResult(treatmentAsString,"")); @@ -525,6 +524,13 @@ public void trackTrafficTypeErrorTest() { verifyNoInteractions(mockSplitClient); } + @Test + public void destroySplitClientTest() { + SplitProvider provider = new SplitProvider(mockSplitClient); + provider.shutdown(); + verify(mockSplitClient).destroy(); + } + private Value mapToValue(Map map) { return new Value(new MutableStructure(map)); } From 7892e4a6600e3d841d158639290d75f9a428dc67 Mon Sep 17 00:00:00 2001 From: Emmanuel Zamora Date: Fri, 3 Oct 2025 20:48:28 -0300 Subject: [PATCH 08/11] restore value in test --- src/test/java/io/split/openfeature/SplitProviderTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/io/split/openfeature/SplitProviderTest.java b/src/test/java/io/split/openfeature/SplitProviderTest.java index c72f124..14f4575 100644 --- a/src/test/java/io/split/openfeature/SplitProviderTest.java +++ b/src/test/java/io/split/openfeature/SplitProviderTest.java @@ -430,6 +430,7 @@ public void evalStructureComplexTest() { "aa", new Value("bb"))))), "list", new Value( List.of( + new Value(1D), new Value(true), mapToValue(Map.of( "cc", new Value("dd") @@ -439,7 +440,7 @@ public void evalStructureComplexTest() { )))), "dateTime", new Value(instant) )); - String treatmentAsString = "{\"string\":\"blah\",\"int\":10,\"double\":100.0,\"bool\":true, \"struct\":{\"foo\":\"bar\",\"baz\":10,\"innerMap\":{\"aa\":\"bb\"}},\"list\":[true,{\"cc\":\"dd\"},{\"ee\":1}],\"dateTime\":\"2022-10-13T22:05:54.828Z\"}"; + String treatmentAsString = "{\"string\":\"blah\",\"int\":10,\"double\":100.0,\"bool\":true, \"struct\":{\"foo\":\"bar\",\"baz\":10,\"innerMap\":{\"aa\":\"bb\"}},\"list\":[1,true,{\"cc\":\"dd\"},{\"ee\":1}],\"dateTime\":\"2022-10-13T22:05:54.828Z\"}"; when(mockSplitClient.getTreatmentWithConfig(eq(key), eq(flagName), anyMap())).thenReturn(new SplitResult(treatmentAsString,"")); From e677c726ebfc1c8939eb39728d48304d8e6ffaed Mon Sep 17 00:00:00 2001 From: Emmanuel Zamora Date: Mon, 6 Oct 2025 10:49:45 -0300 Subject: [PATCH 09/11] prepare release --- CHANGES.txt | 3 +++ README.md | 2 +- pom.xml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 1408609..46be8fa 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +1.2.1 (October 6, 2025) + - Updated dependencies to fix vulnerabilities. + 1.2.0 (September 3, 2025) - Updated `io.split.client` dependency to 4.16.1 - Updated `dev.openfeature` dependency to 1.17.0 diff --git a/README.md b/README.md index 36f6021..095d229 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ This SDK is compatible with Java 11 and higher. io.split.openfeature split-openfeature-provider - 1.2.0 + 1.2.1 ``` ### Configure it diff --git a/pom.xml b/pom.xml index c54cb78..b06e58d 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 io.split.openfeature split-openfeature-provider - 1.2.0 + 1.2.1 split-openfeature-provider-java Split OpenFeature Java Provider www.split.io From 7922d9cade62ea897340b611a31a1db285b22e6e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 13:53:01 +0000 Subject: [PATCH 10/11] Bump org.apache.maven.plugins:maven-compiler-plugin Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.14.0 to 3.14.1. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.14.0...maven-compiler-plugin-3.14.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-version: 3.14.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 11f8ce5..3a21c92 100644 --- a/pom.xml +++ b/pom.xml @@ -92,7 +92,7 @@ maven-compiler-plugin - 3.14.0 + 3.14.1 maven-surefire-plugin @@ -125,7 +125,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 11 11 From a4a4c5c00cef22d3df40519a4c2a2c5d4e258dce Mon Sep 17 00:00:00 2001 From: ZamoraEmmanuel <87494075+ZamoraEmmanuel@users.noreply.github.com> Date: Mon, 6 Oct 2025 11:45:23 -0300 Subject: [PATCH 11/11] Update CHANGES.txt Co-authored-by: Mauro Sanz <51236193+sanzmauro@users.noreply.github.com> --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index 46be8fa..c0dd319 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,6 @@ 1.2.1 (October 6, 2025) - Updated dependencies to fix vulnerabilities. + - Added support for the shutdown feature. 1.2.0 (September 3, 2025) - Updated `io.split.client` dependency to 4.16.1