-
Notifications
You must be signed in to change notification settings - Fork 51
Comparing changes
Open a pull request
base repository: open-feature/java-sdk
base: v1.18.0
head repository: open-feature/java-sdk
compare: v1.18.1
- 13 commits
- 37 files changed
- 6 contributors
Commits on Sep 16, 2025
-
chore(deps): update github/codeql-action digest to 573acd9 (#1600)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 6fb139f - Browse repository at this point
Copy the full SHA 6fb139fView commit details -
test: improve gherkin test suite only relying on the newest version, …
…with data loading (#1578) * test: improve gherkin test suite only relying on the newest version, with data loading Signed-off-by: Simon Schrottner <[email protected]> * Update src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Simon Schrottner <[email protected]> * Update src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Simon Schrottner <[email protected]> * test: improve gherkin test suite only relying on the newest version, with data loading Signed-off-by: Simon Schrottner <[email protected]> diff --git c/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java i/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java index e4cd603..121b567 100644 --- c/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java +++ i/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java @@ -114,9 +114,9 @@ public class ContextSteps { public void a_context_containing_a_key_with_type_and_with_value(String key, String type, String value) throws ClassNotFoundException, InstantiationException { Map<String, Value> map = state.context.asMap(); - Map<String, Value> map = state.context.asMap(); map.put(key, new Value(Utils.convert(value, type))); state.context = new MutableContext(state.context.getTargetingKey(), map); + } @given("a context containing a targeting key with value {string}") public void a_context_containing_a_targeting_key_with_value(String string) { diff --git c/src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java i/src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java index 20f3f5f..138c23f 100644 --- c/src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java +++ i/src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java @@ -46,7 +46,6 @@ public class CelContextEvaluator<T> implements ContextEvaluator<T> { // Evaluate with context, overriding defaults. objectMap.putAll(evaluationContext.asObjectMap()); } - } Object result = program.eval(objectMap); diff --git c/src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java i/src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java index 339d8c8..9a63f58 100644 --- c/src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java +++ i/src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java @@ -50,6 +50,7 @@ public class VariantsMapDeserializer extends JsonDeserializer<Map<String, Object } private Object convertJsonNodeToValue(JsonNode node) throws InstantiationException { + if (node.isNull()) { return null; } else if (node.isBoolean()) { @@ -60,25 +61,8 @@ public class VariantsMapDeserializer extends JsonDeserializer<Map<String, Object return node.asDouble(); } else if (node.isTextual()) { return node.asText(); - } else if (node.isArray()) { - List<Object> list = new ArrayList<>(); - for (JsonNode item : node) { - list.add(convertJsonNodeToValue(item)); - } - return list; } else if (node.isObject()) { - Map<String, Value> map = new HashMap<>(); - Iterator<Map.Entry<String, JsonNode>> fields = node.fields(); - while (fields.hasNext()) { - Map.Entry<String, JsonNode> field = fields.next(); - Object o = convertJsonNodeToValue(field.getValue()); - if (o instanceof Value) { - map.put(field.getKey(), (Value) o); - } else { - map.put(field.getKey(), new Value(o)); - } - } - return new Value(new MutableStructure(map)); + return Value.objectToValue(node); } throw new IllegalArgumentException("Unsupported JSON node type: " + node.getNodeType()); Signed-off-by: Simon Schrottner <[email protected]> * Update src/test/java/dev/openfeature/sdk/e2e/steps/FlagStepDefinitions.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Simon Schrottner <[email protected]> * Update src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Simon Schrottner <[email protected]> * test: improve gherkin test suite only relying on the newest version, with data loading Signed-off-by: Simon Schrottner <[email protected]> diff --git c/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java i/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java index e4cd603..121b567 100644 --- c/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java +++ i/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java @@ -114,9 +114,9 @@ public class ContextSteps { public void a_context_containing_a_key_with_type_and_with_value(String key, String type, String value) throws ClassNotFoundException, InstantiationException { Map<String, Value> map = state.context.asMap(); - Map<String, Value> map = state.context.asMap(); map.put(key, new Value(Utils.convert(value, type))); state.context = new MutableContext(state.context.getTargetingKey(), map); + } @given("a context containing a targeting key with value {string}") public void a_context_containing_a_targeting_key_with_value(String string) { diff --git c/src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java i/src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java index 20f3f5f..138c23f 100644 --- c/src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java +++ i/src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java @@ -46,7 +46,6 @@ public class CelContextEvaluator<T> implements ContextEvaluator<T> { // Evaluate with context, overriding defaults. objectMap.putAll(evaluationContext.asObjectMap()); } - } Object result = program.eval(objectMap); diff --git c/src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java i/src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java index 339d8c8..9a63f58 100644 --- c/src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java +++ i/src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java @@ -50,6 +50,7 @@ public class VariantsMapDeserializer extends JsonDeserializer<Map<String, Object } private Object convertJsonNodeToValue(JsonNode node) throws InstantiationException { + if (node.isNull()) { return null; } else if (node.isBoolean()) { @@ -60,25 +61,8 @@ public class VariantsMapDeserializer extends JsonDeserializer<Map<String, Object return node.asDouble(); } else if (node.isTextual()) { return node.asText(); - } else if (node.isArray()) { - List<Object> list = new ArrayList<>(); - for (JsonNode item : node) { - list.add(convertJsonNodeToValue(item)); - } - return list; } else if (node.isObject()) { - Map<String, Value> map = new HashMap<>(); - Iterator<Map.Entry<String, JsonNode>> fields = node.fields(); - while (fields.hasNext()) { - Map.Entry<String, JsonNode> field = fields.next(); - Object o = convertJsonNodeToValue(field.getValue()); - if (o instanceof Value) { - map.put(field.getKey(), (Value) o); - } else { - map.put(field.getKey(), new Value(o)); - } - } - return new Value(new MutableStructure(map)); + return Value.objectToValue(node); } throw new IllegalArgumentException("Unsupported JSON node type: " + node.getNodeType()); Signed-off-by: Simon Schrottner <[email protected]> diff --git c/src/test/java/dev/openfeature/sdk/e2e/Utils.java i/src/test/java/dev/openfeature/sdk/e2e/Utils.java index 1500d99..565968c 100644 --- c/src/test/java/dev/openfeature/sdk/e2e/Utils.java +++ i/src/test/java/dev/openfeature/sdk/e2e/Utils.java @@ -7,6 +7,8 @@ import java.util.Objects; public final class Utils { + public static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + private Utils() {} public static Object convert(String value, String type) { @@ -27,7 +29,7 @@ public final class Utils { return Long.parseLong(value); case "object": try { - return Value.objectToValue(new ObjectMapper().readValue(value, Object.class)); + return Value.objectToValue(OBJECT_MAPPER.readValue(value, Object.class)); } catch (JsonProcessingException e) { throw new RuntimeException(e); } diff --git c/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java i/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java index 78a2fc5..13fe32f 100644 --- c/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java +++ i/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java @@ -17,6 +17,8 @@ import java.util.Map; import lombok.experimental.UtilityClass; import lombok.extern.slf4j.Slf4j; +import static dev.openfeature.sdk.e2e.Utils.OBJECT_MAPPER; + /** * Test flags utils. */ @@ -41,7 +43,8 @@ public class TestFlagsUtils { */ public static synchronized Map<String, Flag<?>> buildFlags() { if (flags == null) { - ObjectMapper objectMapper = new ObjectMapper(); + if (flags == null) { + ObjectMapper objectMapper = OBJECT_MAPPER; objectMapper.configure(StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION.mappedFeature(), true); objectMapper.addMixIn(Flag.class, InMemoryFlagMixin.class); objectMapper.addMixIn(Flag.FlagBuilder.class, InMemoryFlagMixin.FlagBuilderMixin.class); Signed-off-by: Simon Schrottner <[email protected]> * fixup: add provider-status tests Signed-off-by: Simon Schrottner <[email protected]> * fixup: update spec Signed-off-by: Simon Schrottner <[email protected]> * fixup: add missing steps and adapt to new spec steps Signed-off-by: Simon Schrottner <[email protected]> * fix: race condition? Signed-off-by: Simon Schrottner <[email protected]> --------- Signed-off-by: Simon Schrottner <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for e89fab2 - Browse repository at this point
Copy the full SHA e89fab2View commit details -
fix(deps): update dependency com.fasterxml.jackson:jackson-bom to v2.…
…20.0 (#1604) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for b693390 - Browse repository at this point
Copy the full SHA b693390View commit details -
feat: Add vmlens checks (#1567)
* Add vmlens Signed-off-by: christian.lutnik <[email protected]> * fix test and gitignore Signed-off-by: christian.lutnik <[email protected]> * remove vmlens agent binary Signed-off-by: christian.lutnik <[email protected]> * remove unused import Signed-off-by: christian.lutnik <[email protected]> * remove vmlens from gitignore, add failing test to check if vmlens still works Signed-off-by: christian.lutnik <[email protected]> * remove failing test Signed-off-by: christian.lutnik <[email protected]> * remove volatile Signed-off-by: christian.lutnik <[email protected]> * update vmlens Signed-off-by: christian.lutnik <[email protected]> --------- Signed-off-by: christian.lutnik <[email protected]> Co-authored-by: Simon Schrottner <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for af189f8 - Browse repository at this point
Copy the full SHA af189f8View commit details -
chore(deps): update dependency com.vmlens:vmlens-maven-plugin to v1.2…
….14 (#1606) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for a92a367 - Browse repository at this point
Copy the full SHA a92a367View commit details
Commits on Sep 17, 2025
-
chore(deps): update dependency dev.cel:cel to v0.11.0 (#1603)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for e792221 - Browse repository at this point
Copy the full SHA e792221View commit details -
fix(deps): update dependency com.github.spotbugs:spotbugs to v4.9.6 (#…
…1609) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 45ff89f - Browse repository at this point
Copy the full SHA 45ff89fView commit details -
chore(deps): update actions/setup-java digest to ead9eaa (#1608)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for a40667e - Browse repository at this point
Copy the full SHA a40667eView commit details -
fix: revert hook data to resolve bytecode incompatibility (#1613)
* revert v2 Signed-off-by: christian.lutnik <[email protected]> * remove vmlens to speed up the build Signed-off-by: christian.lutnik <[email protected]> --------- Signed-off-by: christian.lutnik <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9845601 - Browse repository at this point
Copy the full SHA 9845601View commit details -
chore(deps): update dependency com.github.spotbugs:spotbugs-maven-plu…
…gin to v4.9.6.0 (#1612) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for fa23e96 - Browse repository at this point
Copy the full SHA fa23e96View commit details -
* chore: checkout Signed-off-by: Todd Baert <[email protected]> * Update pullrequest.yml Signed-off-by: Todd Baert <[email protected]> * Update release.yml Signed-off-by: Todd Baert <[email protected]> --------- Signed-off-by: Todd Baert <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fbf2a75 - Browse repository at this point
Copy the full SHA fbf2a75View commit details -
Configuration menu - View commit details
-
Copy full SHA for 69c5a12 - Browse repository at this point
Copy the full SHA 69c5a12View commit details -
chore(main): release 1.18.1 (#1602)
* chore(main): release 1.19.0 Signed-off-by: OpenFeature Bot <[email protected]> * Update .release-please-manifest.json Signed-off-by: Todd Baert <[email protected]> * Update CHANGELOG.md Signed-off-by: Todd Baert <[email protected]> * Update README.md Signed-off-by: Todd Baert <[email protected]> * Update README.md Signed-off-by: Todd Baert <[email protected]> * Update pom.xml Signed-off-by: Todd Baert <[email protected]> * Update version.txt Signed-off-by: Todd Baert <[email protected]> --------- Signed-off-by: OpenFeature Bot <[email protected]> Signed-off-by: Todd Baert <[email protected]> Co-authored-by: Todd Baert <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9ff13e2 - Browse repository at this point
Copy the full SHA 9ff13e2View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v1.18.0...v1.18.1