From 7fea9b106c1cf3ffe4ce7d5a9448a179d7041ed0 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Fri, 23 Aug 2024 11:12:31 +0000
Subject: [PATCH 01/24] chore(deps): update dependency net.bytebuddy:byte-buddy
to v1.15.0 (#1063)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index ecfa6e30..60a69ea9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -157,7 +157,7 @@
net.bytebuddy
byte-buddy
- 1.14.19
+ 1.15.0
test
From dd53021153a192370a0cbf56fbccd42eeb870043 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Fri, 23 Aug 2024 13:42:51 +0000
Subject: [PATCH 02/24] chore(deps): update dependency
net.bytebuddy:byte-buddy-agent to v1.15.0 (#1064)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 60a69ea9..cbfaedb4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -164,7 +164,7 @@
net.bytebuddy
byte-buddy-agent
- 1.14.19
+ 1.15.0
test
From a07eb6786546066b0e416c9e072db770833d3dbd Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Fri, 23 Aug 2024 20:07:49 +0000
Subject: [PATCH 03/24] chore(deps): update github/codeql-action digest to
7e27807 (#1067)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
.github/workflows/pullrequest.yml | 4 ++--
.github/workflows/static-code-scanning.yaml | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml
index 95624732..9d6106e7 100644
--- a/.github/workflows/pullrequest.yml
+++ b/.github/workflows/pullrequest.yml
@@ -20,7 +20,7 @@ jobs:
cache: maven
- name: Initialize CodeQL
- uses: github/codeql-action/init@fd5fa130e2c632f29b237077157766ea2ef07a13
+ uses: github/codeql-action/init@7e27807413d1c22e8a745f73376d16e782d861da
with:
languages: java
@@ -45,4 +45,4 @@ jobs:
verbose: true # optional (default = false)
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@fd5fa130e2c632f29b237077157766ea2ef07a13
+ uses: github/codeql-action/analyze@7e27807413d1c22e8a745f73376d16e782d861da
diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml
index 1cf8476a..9067669b 100644
--- a/.github/workflows/static-code-scanning.yaml
+++ b/.github/workflows/static-code-scanning.yaml
@@ -33,12 +33,12 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@fd5fa130e2c632f29b237077157766ea2ef07a13
+ uses: github/codeql-action/init@7e27807413d1c22e8a745f73376d16e782d861da
with:
languages: java
- name: Autobuild
- uses: github/codeql-action/autobuild@fd5fa130e2c632f29b237077157766ea2ef07a13
+ uses: github/codeql-action/autobuild@7e27807413d1c22e8a745f73376d16e782d861da
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@fd5fa130e2c632f29b237077157766ea2ef07a13
+ uses: github/codeql-action/analyze@7e27807413d1c22e8a745f73376d16e782d861da
From ea59e7fa587768832f45a836d4da694a8ebcfde6 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Sat, 24 Aug 2024 05:37:08 +0000
Subject: [PATCH 04/24] chore(deps): update github/codeql-action digest to
a895f2e (#1068)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
.github/workflows/pullrequest.yml | 4 ++--
.github/workflows/static-code-scanning.yaml | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml
index 9d6106e7..3aab7409 100644
--- a/.github/workflows/pullrequest.yml
+++ b/.github/workflows/pullrequest.yml
@@ -20,7 +20,7 @@ jobs:
cache: maven
- name: Initialize CodeQL
- uses: github/codeql-action/init@7e27807413d1c22e8a745f73376d16e782d861da
+ uses: github/codeql-action/init@a895f2e1b5e62f11af85a45bee736f4e3901a87e
with:
languages: java
@@ -45,4 +45,4 @@ jobs:
verbose: true # optional (default = false)
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@7e27807413d1c22e8a745f73376d16e782d861da
+ uses: github/codeql-action/analyze@a895f2e1b5e62f11af85a45bee736f4e3901a87e
diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml
index 9067669b..4a03e20d 100644
--- a/.github/workflows/static-code-scanning.yaml
+++ b/.github/workflows/static-code-scanning.yaml
@@ -33,12 +33,12 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@7e27807413d1c22e8a745f73376d16e782d861da
+ uses: github/codeql-action/init@a895f2e1b5e62f11af85a45bee736f4e3901a87e
with:
languages: java
- name: Autobuild
- uses: github/codeql-action/autobuild@7e27807413d1c22e8a745f73376d16e782d861da
+ uses: github/codeql-action/autobuild@a895f2e1b5e62f11af85a45bee736f4e3901a87e
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@7e27807413d1c22e8a745f73376d16e782d861da
+ uses: github/codeql-action/analyze@a895f2e1b5e62f11af85a45bee736f4e3901a87e
From 35d4cc23c85a24f2d55992cb40b357e450f8e9b7 Mon Sep 17 00:00:00 2001
From: Todd Baert
Date: Mon, 26 Aug 2024 09:16:10 -0400
Subject: [PATCH 05/24] chore: various non-functional refactors (#1066)
Signed-off-by: Todd Baert
---
.../java/dev/openfeature/sdk/BooleanHook.java | 5 +++-
.../java/dev/openfeature/sdk/DoubleHook.java | 5 +++-
.../dev/openfeature/sdk/ImmutableContext.java | 22 ++++++++++++----
.../java/dev/openfeature/sdk/IntegerHook.java | 5 +++-
.../dev/openfeature/sdk/MutableContext.java | 26 ++++++++++++++-----
.../openfeature/sdk/OpenFeatureClient.java | 8 +++++-
.../java/dev/openfeature/sdk/StringHook.java | 5 +++-
.../ExcludeFromGeneratedCoverageReport.java | 14 ++++++++++
8 files changed, 73 insertions(+), 17 deletions(-)
create mode 100644 src/main/java/dev/openfeature/sdk/internal/ExcludeFromGeneratedCoverageReport.java
diff --git a/src/main/java/dev/openfeature/sdk/BooleanHook.java b/src/main/java/dev/openfeature/sdk/BooleanHook.java
index bc07d898..e9277766 100644
--- a/src/main/java/dev/openfeature/sdk/BooleanHook.java
+++ b/src/main/java/dev/openfeature/sdk/BooleanHook.java
@@ -1,7 +1,10 @@
package dev.openfeature.sdk;
/**
- * {@inheritDoc}
+ * An extension point which can run around flag resolution. They are intended to be used as a way to add custom logic
+ * to the lifecycle of flag evaluation.
+ *
+ * @see Hook
*/
public interface BooleanHook extends Hook {
diff --git a/src/main/java/dev/openfeature/sdk/DoubleHook.java b/src/main/java/dev/openfeature/sdk/DoubleHook.java
index 1da0602d..3ccf88b1 100644
--- a/src/main/java/dev/openfeature/sdk/DoubleHook.java
+++ b/src/main/java/dev/openfeature/sdk/DoubleHook.java
@@ -1,7 +1,10 @@
package dev.openfeature.sdk;
/**
- * {@inheritDoc}
+ * An extension point which can run around flag resolution. They are intended to be used as a way to add custom logic
+ * to the lifecycle of flag evaluation.
+ *
+ * @see Hook
*/
public interface DoubleHook extends Hook {
diff --git a/src/main/java/dev/openfeature/sdk/ImmutableContext.java b/src/main/java/dev/openfeature/sdk/ImmutableContext.java
index 57009987..fd2ff2a6 100644
--- a/src/main/java/dev/openfeature/sdk/ImmutableContext.java
+++ b/src/main/java/dev/openfeature/sdk/ImmutableContext.java
@@ -1,10 +1,11 @@
package dev.openfeature.sdk;
-import lombok.ToString;
-import lombok.experimental.Delegate;
-
import java.util.HashMap;
import java.util.Map;
+import java.util.function.Function;
+import dev.openfeature.sdk.internal.ExcludeFromGeneratedCoverageReport;
+import lombok.ToString;
+import lombok.experimental.Delegate;
/**
* The EvaluationContext is a container for arbitrary contextual data
@@ -16,8 +17,8 @@
@SuppressWarnings("PMD.BeanMembersShouldSerialize")
public final class ImmutableContext implements EvaluationContext {
- @Delegate
- private final Structure structure;
+ @Delegate(excludes = DelegateExclusions.class)
+ private final ImmutableStructure structure;
/**
* Create an immutable context with an empty targeting_key and attributes provided.
@@ -84,4 +85,15 @@ public EvaluationContext merge(EvaluationContext overridingContext) {
return new ImmutableContext(
this.merge(ImmutableStructure::new, this.asMap(), overridingContext.asMap()));
}
+
+ @SuppressWarnings("all")
+ private static class DelegateExclusions {
+ @ExcludeFromGeneratedCoverageReport
+ public Map merge(Function