Skip to content

Commit 81a60a2

Browse files
authored
Merge branch 'main' into extract-vmlens-version
Signed-off-by: chrfwow <christian.lutnik@dynatrace.com>
2 parents 66e4670 + 857fb9d commit 81a60a2

21 files changed

+163
-674
lines changed

.github/workflows/merge.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ jobs:
2222

2323
steps:
2424
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
25+
with:
26+
fetch-depth: 0
27+
submodules: recursive
2528
- name: Set up JDK 17
26-
uses: actions/setup-java@a7ab372554b6eb1a8eb25e7d9aec1cc9f3ea1a76
29+
uses: actions/setup-java@ead9eaa3cfe0b0fc2fa749519ae09c3d4f4080b0
2730
with:
2831
java-version: '17'
2932
distribution: 'temurin'

.github/workflows/pullrequest.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,19 @@ jobs:
2020
steps:
2121
- name: Check out the code
2222
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
23+
with:
24+
fetch-depth: 0
25+
submodules: recursive
2326

2427
- name: Set up JDK ${{ matrix.build.java }}
25-
uses: actions/setup-java@a7ab372554b6eb1a8eb25e7d9aec1cc9f3ea1a76
28+
uses: actions/setup-java@ead9eaa3cfe0b0fc2fa749519ae09c3d4f4080b0
2629
with:
2730
java-version: ${{ matrix.build.java }}
2831
distribution: 'temurin'
2932
cache: maven
3033

3134
- name: Initialize CodeQL
32-
uses: github/codeql-action/init@573acd9552f33577783abde4acb66a1058e762e5
35+
uses: github/codeql-action/init@0337c4c06e7e00d0d6e64396c13b9dc18dd6d8c5
3336
with:
3437
languages: java
3538

@@ -55,4 +58,4 @@ jobs:
5558
verbose: true # optional (default = false)
5659

5760
- name: Perform CodeQL Analysis
58-
uses: github/codeql-action/analyze@573acd9552f33577783abde4acb66a1058e762e5
61+
uses: github/codeql-action/analyze@0337c4c06e7e00d0d6e64396c13b9dc18dd6d8c5

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,12 @@ jobs:
3838
steps:
3939
- name: Checkout Repository
4040
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
41+
with:
42+
fetch-depth: 0
43+
submodules: recursive
4144

4245
- name: Set up JDK 17
43-
uses: actions/setup-java@a7ab372554b6eb1a8eb25e7d9aec1cc9f3ea1a76
46+
uses: actions/setup-java@ead9eaa3cfe0b0fc2fa749519ae09c3d4f4080b0
4447
with:
4548
java-version: '17'
4649
distribution: 'temurin'

.github/workflows/static-code-scanning.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ jobs:
3333

3434
# Initializes the CodeQL tools for scanning.
3535
- name: Initialize CodeQL
36-
uses: github/codeql-action/init@573acd9552f33577783abde4acb66a1058e762e5
36+
uses: github/codeql-action/init@0337c4c06e7e00d0d6e64396c13b9dc18dd6d8c5
3737
with:
3838
languages: java
3939

4040
- name: Autobuild
41-
uses: github/codeql-action/autobuild@573acd9552f33577783abde4acb66a1058e762e5
41+
uses: github/codeql-action/autobuild@0337c4c06e7e00d0d6e64396c13b9dc18dd6d8c5
4242

4343
- name: Perform CodeQL Analysis
44-
uses: github/codeql-action/analyze@573acd9552f33577783abde4acb66a1058e762e5
44+
uses: github/codeql-action/analyze@0337c4c06e7e00d0d6e64396c13b9dc18dd6d8c5

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{".":"1.18.0"}
1+
{".":"1.18.1"}

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Changelog
22

3+
## [1.18.1](https://github.com/open-feature/java-sdk/compare/v1.18.0...v1.18.1) (2025-09-17)
4+
5+
6+
### 🐛 Bug Fixes
7+
8+
* **deps:** update dependency com.fasterxml.jackson:jackson-bom to v2.20.0 ([#1604](https://github.com/open-feature/java-sdk/issues/1604)) ([b693390](https://github.com/open-feature/java-sdk/commit/b69339067a75a524911dded9798a06e58d628bce))
9+
* **deps:** update dependency com.github.spotbugs:spotbugs to v4.9.6 ([#1609](https://github.com/open-feature/java-sdk/issues/1609)) ([45ff89f](https://github.com/open-feature/java-sdk/commit/45ff89f530e8c73636618676b9db46c61235df57))
10+
* revert hook data to resolve bytecode incompatibility ([#1613](https://github.com/open-feature/java-sdk/issues/1613)) ([9845601](https://github.com/open-feature/java-sdk/commit/984560196d4a34fb21c8946d1dc675cf6565e90f))
11+
12+
13+
### 🧹 Chore
14+
15+
* **deps:** update actions/setup-java digest to ead9eaa ([#1608](https://github.com/open-feature/java-sdk/issues/1608)) ([a40667e](https://github.com/open-feature/java-sdk/commit/a40667e9cb635f9ba31f6975ba72bc5932fca094))
16+
* **deps:** update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.6.0 ([#1612](https://github.com/open-feature/java-sdk/issues/1612)) ([fa23e96](https://github.com/open-feature/java-sdk/commit/fa23e960ff9dc52b5c44b56e521485ca03e0e650))
17+
* **deps:** update dependency com.vmlens:vmlens-maven-plugin to v1.2.14 ([#1606](https://github.com/open-feature/java-sdk/issues/1606)) ([a92a367](https://github.com/open-feature/java-sdk/commit/a92a367fef71cc9ec26f6b1b6609fb8e6b2543bc))
18+
* **deps:** update dependency dev.cel:cel to v0.11.0 ([#1603](https://github.com/open-feature/java-sdk/issues/1603)) ([e792221](https://github.com/open-feature/java-sdk/commit/e7922212d8cd964a8a24dacc518ff31c77fcfae6))
19+
* **deps:** update github/codeql-action digest to 573acd9 ([#1600](https://github.com/open-feature/java-sdk/issues/1600)) ([6fb139f](https://github.com/open-feature/java-sdk/commit/6fb139f8425fb76368b1e1baa745aa182f8c13f7))
20+
* fix checkout ([#1614](https://github.com/open-feature/java-sdk/issues/1614)) ([fbf2a75](https://github.com/open-feature/java-sdk/commit/fbf2a752647817d3e25d4f8b67893ba5e8f89b7a))
21+
* relax coverage ([69c5a12](https://github.com/open-feature/java-sdk/commit/69c5a1244283d22af0119f534270726a8c520367))
22+
323
## [1.18.0](https://github.com/open-feature/java-sdk/compare/v1.17.0...v1.18.0) (2025-09-16)
424

525

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
</a>
1919
<!-- x-release-please-start-version -->
2020

21-
<a href="https://github.com/open-feature/java-sdk/releases/tag/v1.18.0">
22-
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.18.0&color=blue&style=for-the-badge" />
21+
<a href="https://github.com/open-feature/java-sdk/releases/tag/v1.18.1">
22+
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.18.1&color=blue&style=for-the-badge" />
2323
</a>
2424

2525
<!-- x-release-please-end -->
@@ -59,7 +59,7 @@ Note that this library is intended to be used in server-side contexts and has no
5959
<dependency>
6060
<groupId>dev.openfeature</groupId>
6161
<artifactId>sdk</artifactId>
62-
<version>1.18.0</version>
62+
<version>1.18.1</version>
6363
</dependency>
6464
```
6565
<!-- x-release-please-end-version -->
@@ -84,7 +84,7 @@ If you would like snapshot builds, this is the relevant repository information:
8484
<!-- x-release-please-start-version -->
8585
```groovy
8686
dependencies {
87-
implementation 'dev.openfeature:sdk:1.18.0'
87+
implementation 'dev.openfeature:sdk:1.18.1'
8888
}
8989
```
9090
<!-- x-release-please-end-version -->

pom.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55

66
<groupId>dev.openfeature</groupId>
77
<artifactId>sdk</artifactId>
8-
<version>1.18.0</version> <!--x-release-please-version -->
8+
<version>1.18.1</version> <!--x-release-please-version -->
99

1010
<properties>
1111
<toolchain.jdk.version>[17,)</toolchain.jdk.version>
1212
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1313
<maven.compiler.source>11</maven.compiler.source>
1414
<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
15-
<org.mockito.version>5.19.0</org.mockito.version>
1615
<com.vmlens.version>1.2.14</com.vmlens.version>
16+
<org.mockito.version>5.20.0</org.mockito.version>
1717
<!-- exclusion expression for e2e tests -->
1818
<testExclusions>**/e2e/*.java</testExclusions>
1919
<module-name>${project.groupId}.${project.artifactId}</module-name>
@@ -53,15 +53,15 @@
5353
<dependency>
5454
<groupId>org.projectlombok</groupId>
5555
<artifactId>lombok</artifactId>
56-
<version>1.18.40</version>
56+
<version>1.18.42</version>
5757
<scope>provided</scope>
5858
</dependency>
5959

6060
<dependency>
6161
<!-- used so that lombok can generate suppressions for spotbugs. It needs to find it on the relevant classpath -->
6262
<groupId>com.github.spotbugs</groupId>
6363
<artifactId>spotbugs</artifactId>
64-
<version>4.9.5</version>
64+
<version>4.9.6</version>
6565
<scope>provided</scope>
6666
</dependency>
6767

@@ -89,7 +89,7 @@
8989
<dependency>
9090
<groupId>org.assertj</groupId>
9191
<artifactId>assertj-core</artifactId>
92-
<version>3.27.4</version>
92+
<version>3.27.5</version>
9393
<scope>test</scope>
9494
</dependency>
9595

@@ -151,7 +151,7 @@
151151
<dependency>
152152
<groupId>com.google.guava</groupId>
153153
<artifactId>guava</artifactId>
154-
<version>33.4.8-jre</version>
154+
<version>33.5.0-jre</version>
155155
<scope>test</scope>
156156
</dependency>
157157

@@ -349,7 +349,7 @@
349349
</activation>
350350
<build>
351351
<plugins>
352-
<plugin>
352+
<!--<plugin>
353353
<groupId>com.vmlens</groupId>
354354
<artifactId>vmlens-maven-plugin</artifactId>
355355
<version>${com.vmlens.version}</version>
@@ -364,7 +364,7 @@
364364
</configuration>
365365
</execution>
366366
</executions>
367-
</plugin>
367+
</plugin>-->
368368
<plugin>
369369
<artifactId>maven-dependency-plugin</artifactId>
370370
<version>3.8.1</version>
@@ -445,7 +445,7 @@
445445
<limit>
446446
<counter>LINE</counter>
447447
<value>COVEREDRATIO</value>
448-
<minimum>0.80</minimum>
448+
<minimum>0.70</minimum>
449449
</limit>
450450
</limits>
451451
</rule>
@@ -458,7 +458,7 @@
458458
<plugin>
459459
<groupId>com.github.spotbugs</groupId>
460460
<artifactId>spotbugs-maven-plugin</artifactId>
461-
<version>4.9.5.0</version>
461+
<version>4.9.6.0</version>
462462
<configuration>
463463
<excludeFilterFile>spotbugs-exclusions.xml</excludeFilterFile>
464464
<plugins>
@@ -474,7 +474,7 @@
474474
<dependency>
475475
<groupId>com.github.spotbugs</groupId>
476476
<artifactId>spotbugs</artifactId>
477-
<version>4.9.5</version>
477+
<version>4.9.6</version>
478478
</dependency>
479479
</dependencies>
480480
<executions>
Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,32 @@
11
package dev.openfeature.sdk;
22

3-
import dev.openfeature.sdk.HookContextWithoutData.HookContextWithoutDataBuilder;
3+
import lombok.Builder;
4+
import lombok.NonNull;
5+
import lombok.Value;
6+
import lombok.With;
47

58
/**
6-
* A interface to hold immutable context that {@link Hook} instances use.
9+
* A data class to hold immutable context that {@link Hook} instances use.
10+
*
11+
* @param <T> the type for the flag being evaluated
712
*/
8-
public interface HookContext<T> {
13+
@Value
14+
@Builder
15+
@With
16+
public class HookContext<T> {
17+
@NonNull String flagKey;
18+
19+
@NonNull FlagValueType type;
20+
21+
@NonNull T defaultValue;
22+
23+
@NonNull EvaluationContext ctx;
24+
25+
ClientMetadata clientMetadata;
26+
Metadata providerMetadata;
27+
928
/**
10-
* Builds a {@link HookContextWithoutData} instances from request data.
29+
* Builds a {@link HookContext} instances from request data.
1130
*
1231
* @param key feature flag key
1332
* @param type flag value type
@@ -17,39 +36,21 @@ public interface HookContext<T> {
1736
* @param defaultValue Fallback value
1837
* @param <T> type that the flag is evaluating against
1938
* @return resulting context for hook
20-
* @deprecated this should not be instantiated outside the SDK anymore
2139
*/
22-
@Deprecated
23-
static <T> HookContext<T> from(
40+
public static <T> HookContext<T> from(
2441
String key,
2542
FlagValueType type,
2643
ClientMetadata clientMetadata,
2744
Metadata providerMetadata,
2845
EvaluationContext ctx,
2946
T defaultValue) {
30-
return new HookContextWithoutData<>(key, type, defaultValue, ctx, clientMetadata, providerMetadata);
31-
}
32-
33-
/**
34-
* Returns a builder for our default HookContext object.
35-
*/
36-
static <T> HookContextWithoutDataBuilder<T> builder() {
37-
return HookContextWithoutData.<T>builder();
38-
}
39-
40-
String getFlagKey();
41-
42-
FlagValueType getType();
43-
44-
T getDefaultValue();
45-
46-
EvaluationContext getCtx();
47-
48-
ClientMetadata getClientMetadata();
49-
50-
Metadata getProviderMetadata();
51-
52-
default HookData getHookData() {
53-
return null;
47+
return HookContext.<T>builder()
48+
.flagKey(key)
49+
.type(type)
50+
.clientMetadata(clientMetadata)
51+
.providerMetadata(providerMetadata)
52+
.ctx(ctx)
53+
.defaultValue(defaultValue)
54+
.build();
5455
}
5556
}

src/main/java/dev/openfeature/sdk/HookContextWithData.java

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)