Commit 624c4de
committed
feat: Complete cleanup of legacy files and remove Lombok from SDK tests
## Legacy File Cleanup
- Remove entire legacy `src/` directory (85+ source files, 100+ test files)
- Remove `pom.xml.backup` backup file
- Remove orphaned `test_noop_access.java` test file
- Cleanup eliminates duplicate code after successful module separation
## SDK Test Lombok Removal (17 files)
### Files with @Getter annotations:
- MockHook.java: Added manual getters (isBeforeCalled, isAfterCalled, etc.)
- ContextStoringProvider.java: Added manual getEvaluationContext() getter
### Files with @SneakyThrows annotations:
- Replaced with proper `throws Exception` declarations in 12 test files:
EventProviderTest, TrackingSpecTest, FlagEvaluationSpecTest, EventsTest,
FeatureProviderStateManagerTest, HookSpecTest, LoggingHookTest,
InMemoryProviderTest, StepDefinitions, TestEventsProvider,
ThreadLocalTransactionContextPropagatorTest
- DeveloperExperienceTest: Replaced with proper try-catch block
### Files with @UtilityClass annotations:
- ProviderFixture.java, TestFlagsUtils.java, ConditionStubber.java:
Replaced with private constructors to prevent instantiation
## Results
- Project is now completely Lombok-free (both API and SDK modules)
- Clean multi-module structure without legacy duplicates
- All main source code compiles successfully
- Maintains same test functionality with manual implementations
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
diff --git c/openfeature-sdk/src/test/java/dev/openfeature/sdk/DeveloperExperienceTest.java i/openfeature-sdk/src/test/java/dev/openfeature/sdk/DeveloperExperienceTest.java
index 16bca51..fe45552 100644
--- c/openfeature-sdk/src/test/java/dev/openfeature/sdk/DeveloperExperienceTest.java
+++ i/openfeature-sdk/src/test/java/dev/openfeature/sdk/DeveloperExperienceTest.java
@@ -28,7 +28,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
-import lombok.SneakyThrows;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -120,13 +119,16 @@ class DeveloperExperienceTest implements HookFixtures {
class MutatingHook implements Hook {
@Override
- @SneakyThrows
// change the provider during a before hook - this should not impact the evaluation in progress
public Optional before(HookContext ctx, Map hints) {
+ try {
- api.setProviderAndWait(TestEventsProvider.newInitializedTestEventsProvider());
+ api.setProviderAndWait(TestEventsProvider.newInitializedTestEventsProvider());
- return Optional.empty();
+ return Optional.empty();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
}
}
diff --git c/openfeature-sdk/src/test/java/dev/openfeature/sdk/EventProviderTest.java i/openfeature-sdk/src/test/java/dev/openfeature/sdk/EventProviderTest.java
index 457e820..a75a175 100644
--- c/openfeature-sdk/src/test/java/dev/openfeature/sdk/EventProviderTest.java
+++ i/openfeature-sdk/src/test/java/dev/openfeature/sdk/EventProviderTest.java
@@ -17,7 +17,6 @@ import dev.openfeature.api.internal.noop.NoOpProvider;
import dev.openfeature.sdk.internal.TriConsumer;
import dev.openfeature.sdk.testutils.TestStackedEmitCallsProvider;
import io.cucumber.java.AfterAll;
-import lombok.SneakyThrows;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
@@ -30,8 +29,7 @@ class EventProviderTest {
private TestEventProvider eventProvider;
@BeforeEach
- @SneakyThrows
- void setup() {
+ void setup() throws Exception {
eventProvider = new TestEventProvider();
eventProvider.initialize(null);
}
@@ -97,10 +95,9 @@ class EventProviderTest {
}
@Test
- @SneakyThrows
@Timeout(value = 2, threadMode = Timeout.ThreadMode.SEPARATE_THREAD)
@DisplayName("should not deadlock on emit called during emit")
- void doesNotDeadlockOnEmitStackedCalls() {
+ void doesNotDeadlockOnEmitStackedCalls() throws Exception {
TestStackedEmitCallsProvider provider = new TestStackedEmitCallsProvider();
new DefaultOpenFeatureAPI().setProviderAndWait(provider);
}
diff --git c/openfeature-sdk/src/test/java/dev/openfeature/sdk/EventsTest.java i/openfeature-sdk/src/test/java/dev/openfeature/sdk/EventsTest.java
index b9ac271..9e021c3 100644
--- c/openfeature-sdk/src/test/java/dev/openfeature/sdk/EventsTest.java
+++ i/openfeature-sdk/src/test/java/dev/openfeature/sdk/EventsTest.java
@@ -23,7 +23,6 @@ import dev.openfeature.sdk.testutils.TestEventsProvider;
import java.util.Arrays;
import java.util.List;
import java.util.function.Consumer;
-import lombok.SneakyThrows;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
@@ -687,8 +686,7 @@ class EventsTest {
text = "The API and client MUST provide a function allowing the removal of event handlers.")
@Test
@DisplayName("should not run removed events")
- @SneakyThrows
- void removedEventsShouldNotRun() {
+ void removedEventsShouldNotRun() throws Exception {
final String name = "removedEventsShouldNotRun";
final Consumer<EventDetails> handler1 = mockHandler();
final Consumer<EventDetails> handler2 = mockHandler();
diff --git c/openfeature-sdk/src/test/java/dev/openfeature/sdk/FeatureProviderStateManagerTest.java i/openfeature-sdk/src/test/java/dev/openfeature/sdk/FeatureProviderStateManagerTest.java
index 080c0a0..ff35f51 100644
--- c/openfeature-sdk/src/test/java/dev/openfeature/sdk/FeatureProviderStateManagerTest.java
+++ i/openfeature-sdk/src/test/java/dev/openfeature/sdk/FeatureProviderStateManagerTest.java
@@ -15,7 +15,6 @@ import dev.openfeature.api.exceptions.FatalError;
import dev.openfeature.api.exceptions.GeneralError;
import java.util.concurrent.atomic.AtomicInteger;
import javax.annotation.Nullable;
-import lombok.SneakyThrows;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -30,17 +29,15 @@ class FeatureProviderStateManagerTest {
wrapper = new FeatureProviderStateManager(testDelegate);
}
- @SneakyThrows
@Test
- void shouldOnlyCallInitOnce() {
+ void shouldOnlyCallInitOnce() throws Exception {
wrapper.initialize(null);
wrapper.initialize(null);
assertThat(testDelegate.initCalled.get()).isOne();
}
- @SneakyThrows
@Test
- void shouldCallInitTwiceWhenShutDownInTheMeantime() {
+ void shouldCallInitTwiceWhenShutDownInTheMeantime() throws Exception {
wrapper.initialize(null);
wrapper.shutdown();
wrapper.initialize(null);
@@ -53,21 +50,19 @@ class FeatureProviderStateManagerTest {
assertThat(wrapper.getState()).isEqualTo(ProviderState.NOT_READY);
}
- @SneakyThrows
@Test
@Specification(
number = "1.7.3",
text =
"The client's provider status accessor MUST indicate READY if the initialize function of the associated provider terminates normally.")
- void shouldSetStateToReadyAfterInit() {
+ void shouldSetStateToReadyAfterInit() throws Exception {
assertThat(wrapper.getState()).isEqualTo(ProviderState.NOT_READY);
wrapper.initialize(null);
assertThat(wrapper.getState()).isEqualTo(ProviderState.READY);
}
- @SneakyThrows
@Test
- void shouldSetStateToNotReadyAfterShutdown() {
+ void shouldSetStateToNotReadyAfterShutdown() throws Exception {
assertThat(wrapper.getState()).isEqualTo(ProviderState.NOT_READY);
wrapper.initialize(null);
assertThat(wrapper.getState()).isEqualTo(ProviderState.READY);
diff --git c/openfeature-sdk/src/test/java/dev/openfeature/sdk/FlagEvaluationSpecTest.java i/openfeature-sdk/src/test/java/dev/openfeature/sdk/FlagEvaluationSpecTest.java
index 170a574..f90c349 100644
--- c/openfeature-sdk/src/test/java/dev/openfeature/sdk/FlagEvaluationSpecTest.java
+++ i/openfeature-sdk/src/test/java/dev/openfeature/sdk/FlagEvaluationSpecTest.java
@@ -38,7 +38,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
-import lombok.SneakyThrows;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -56,8 +55,7 @@ class FlagEvaluationSpecTest implements HookFixtures {
return api.getClient();
}
- @SneakyThrows
- private Client _initializedClient() {
+ private Client _initializedClient() throws Exception {
TestEventsProvider provider = new TestEventsProvider();
provider.initialize(null);
api.setProviderAndWait(provider);
@@ -91,13 +89,12 @@ class FlagEvaluationSpecTest implements HookFixtures {
assertThat(api.getProvider()).isEqualTo(mockProvider);
}
- @SneakyThrows
@Specification(
number = "1.1.8",
text =
"The API SHOULD provide functions to set a provider and wait for the initialize function to return or throw.")
@Test
- void providerAndWait() {
+ void providerAndWait() throws Exception {
FeatureProvider provider = new TestEventsProvider(500);
api.setProviderAndWait(provider);
Client client = api.getClient();
@@ -110,13 +107,12 @@ class FlagEvaluationSpecTest implements HookFixtures {
assertThat(client2.getProviderState()).isEqualTo(ProviderState.READY);
}
- @SneakyThrows
@Specification(
number = "1.1.8",
text =
"The API SHOULD provide functions to set a provider and wait for the initialize function to return or throw.")
@Test
- void providerAndWaitError() {
+ void providerAndWaitError() throws Exception {
FeatureProvider provider1 = new TestEventsProvider(500, true, "fake error");
assertThrows(GeneralError.class, () -> api.setProviderAndWait(provider1));
@@ -361,9 +357,8 @@ class FlagEvaluationSpecTest implements HookFixtures {
number = "1.5.1",
text =
"The evaluation options structure's hooks field denotes an ordered collection of hooks that the client MUST execute for the respective flag evaluation, in addition to those already configured.")
- @SneakyThrows
@Test
- void hooks() {
+ void hooks() throws Exception {
Client c = _initializedClient();
Hook<Boolean> clientHook = mockBooleanHook();
Hook<Boolean> invocationHook = mockBooleanHook();
diff --git c/openfeature-sdk/src/test/java/dev/openfeature/sdk/HookSpecTest.java i/openfeature-sdk/src/test/java/dev/openfeature/sdk/HookSpecTest.java
index 06fa8de..7d8b3bf 100644
--- c/openfeature-sdk/src/test/java/dev/openfeature/sdk/HookSpecTest.java
+++ i/openfeature-sdk/src/test/java/dev/openfeature/sdk/HookSpecTest.java
@@ -42,7 +42,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
-import lombok.SneakyThrows;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
@@ -443,9 +442,8 @@ class HookSpecTest implements HookFixtures {
number = "4.4.6",
text =
"If an error occurs during the evaluation of before or after hooks, any remaining hooks in the before or after stages MUST NOT be invoked.")
- @SneakyThrows
@Test
- void error_stops_after() {
+ void error_stops_after() throws Exception {
Hook<Boolean> h = mockBooleanHook();
doThrow(RuntimeException.class).when(h).after(any(), any(), any());
Hook<Boolean> h2 = mockBooleanHook();
@@ -468,9 +466,8 @@ class HookSpecTest implements HookFixtures {
@Specification(number = "4.5.2", text = "hook hints MUST be passed to each hook.")
@Specification(number = "4.2.2.1", text = "Condition: Hook hints MUST be immutable.")
@Specification(number = "4.5.3", text = "The hook MUST NOT alter the hook hints structure.")
- @SneakyThrows
@Test
- void hook_hints() {
+ void hook_hints() throws Exception {
String hintKey = "My hint key";
Client client = getClient(null);
Hook<Boolean> mutatingHook = new BooleanHook() {
@@ -552,7 +549,7 @@ class HookSpecTest implements HookFixtures {
number = "4.4.7",
text = "If an error occurs in the before hooks, the default value MUST be returned.")
@Test
- void error_hooks__before() {
+ void error_hooks__before() throws Exception {
Hook hook = mockBooleanHook();
doThrow(RuntimeException.class).when(hook).before(any(), any());
Client client = getClient(TestEventsProvider.newInitializedTestEventsProvider());
@@ -570,7 +567,7 @@ class HookSpecTest implements HookFixtures {
number = "4.4.5",
text = "If an error occurs in the before or after hooks, the error hooks MUST be invoked.")
@Test
- void error_hooks__after() {
+ void error_hooks__after() throws Exception {
Hook hook = mockBooleanHook();
doThrow(RuntimeException.class).when(hook).after(any(), any(), any());
Client client = getClient(TestEventsProvider.newInitializedTestEventsProvider());
@@ -584,7 +581,7 @@ class HookSpecTest implements HookFixtures {
}
@Test
- void erroneous_flagResolution_setsAppropriateFieldsInFlagEvaluationDetails() {
+ void erroneous_flagResolution_setsAppropriateFieldsInFlagEvaluationDetails() throws Exception {
Hook hook = mockBooleanHook();
doThrow(RuntimeException.class).when(hook).after(any(), any(), any());
String flagKey = "test-flag-key";
@@ -630,7 +627,7 @@ class HookSpecTest implements HookFixtures {
}
@Test
- void successful_flagResolution_setsAppropriateFieldsInFlagEvaluationDetails() {
+ void successful_flagResolution_setsAppropriateFieldsInFlagEvaluationDetails() throws Exception {
Hook hook = mockBooleanHook();
String flagKey = "test-flag-key";
Client client = getClient(TestEventsProvider.newInitializedTestEventsProvider());
@@ -655,7 +652,7 @@ class HookSpecTest implements HookFixtures {
}
@Test
- void multi_hooks_early_out__before() {
+ void multi_hooks_early_out__before() throws Exception {
Hook<Boolean> hook = mockBooleanHook();
Hook<Boolean> hook2 = mockBooleanHook();
doThrow(RuntimeException.class).when(hook).before(any(), any());
@@ -681,7 +678,7 @@ class HookSpecTest implements HookFixtures {
text =
"Any `evaluation context` returned from a `before` hook MUST be passed to subsequent `before` hooks (via `HookContext`).")
@Test
- void beforeContextUpdated() {
+ void beforeContextUpdated() throws Exception {
String targetingKey = "test-key";
EvaluationContext ctx = new ImmutableContext(targetingKey);
Hook<Boolean> hook = mockBooleanHook();
@@ -749,7 +746,7 @@ class HookSpecTest implements HookFixtures {
text =
"If a finally hook abnormally terminates, evaluation MUST proceed, including the execution of any remaining finally hooks.")
@Test
- void first_finally_broken() {
+ void first_finally_broken() throws Exception {
Hook hook = mockBooleanHook();
doThrow(RuntimeException.class).when(hook).before(any(), any());
doThrow(RuntimeException.class).when(hook).finallyAfter(any(), any(), any());
@@ -773,7 +770,7 @@ class HookSpecTest implements HookFixtures {
text =
"If an error hook abnormally terminates, evaluation MUST proceed, including the execution of any remaining error hooks.")
@Test
- void first_error_broken() {
+ void first_error_broken() throws Exception {
Hook hook = mockBooleanHook();
doThrow(RuntimeException.class).when(hook).before(any(), any());
doThrow(RuntimeException.class).when(hook).error(any(), any(), any());
@@ -792,7 +789,7 @@ class HookSpecTest implements HookFixtures {
order.verify(hook).error(any(), any(), any());
}
- private Client getClient(FeatureProvider provider) {
+ private Client getClient(FeatureProvider provider) throws Exception {
if (provider == null) {
api.setProviderAndWait(TestEventsProvider.newInitializedTestEventsProvider());
} else {
@@ -806,9 +803,8 @@ class HookSpecTest implements HookFixtures {
void default_methods_so_impossible() {}
@Specification(number = "4.3.9.1", text = "Instead of finally, finallyAfter SHOULD be used.")
- @SneakyThrows
@Test
- void doesnt_use_finally() {
+ void doesnt_use_finally() throws Exception {
assertThatCode(() -> Hook.class.getMethod("finally", HookContext.class, Map.class))
.as("Not possible. Finally is a reserved word.")
.isInstanceOf(NoSuchMethodException.class);
diff --git c/openfeature-sdk/src/test/java/dev/openfeature/sdk/ThreadLocalTransactionContextPropagatorTest.java i/openfeature-sdk/src/test/java/dev/openfeature/sdk/ThreadLocalTransactionContextPropagatorTest.java
index f37713a..b5414b4 100644
--- c/openfeature-sdk/src/test/java/dev/openfeature/sdk/ThreadLocalTransactionContextPropagatorTest.java
+++ i/openfeature-sdk/src/test/java/dev/openfeature/sdk/ThreadLocalTransactionContextPropagatorTest.java
@@ -8,7 +8,6 @@ import dev.openfeature.api.EvaluationContext;
import dev.openfeature.api.ImmutableContext;
import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;
-import lombok.SneakyThrows;
import org.junit.jupiter.api.Test;
public class ThreadLocalTransactionContextPropagatorTest {
@@ -32,9 +31,8 @@ public class ThreadLocalTransactionContextPropagatorTest {
assertNull(result);
}
- @SneakyThrows
@Test
- public void setTransactionContextTwoThreads() {
+ public void setTransactionContextTwoThreads() throws Exception {
EvaluationContext firstContext = new ImmutableContext();
EvaluationContext secondContext = new ImmutableContext();
diff --git c/openfeature-sdk/src/test/java/dev/openfeature/sdk/TrackingSpecTest.java i/openfeature-sdk/src/test/java/dev/openfeature/sdk/TrackingSpecTest.java
index 90867c5..a42aa3f 100644
--- c/openfeature-sdk/src/test/java/dev/openfeature/sdk/TrackingSpecTest.java
+++ i/openfeature-sdk/src/test/java/dev/openfeature/sdk/TrackingSpecTest.java
@@ -28,7 +28,6 @@ import dev.openfeature.api.Value;
import dev.openfeature.sdk.fixtures.ProviderFixture;
import java.util.HashMap;
import java.util.Map;
-import lombok.SneakyThrows;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -54,8 +53,7 @@ class TrackingSpecTest {
+ "particular action or application state, with parameters `tracking event name` (string, required) and "
+ "`tracking event details` (optional), which returns nothing.")
@Test
- @SneakyThrows
- void trackMethodFulfillsSpec() {
+ void trackMethodFulfillsSpec() throws Exception {
ImmutableContext ctx = new ImmutableContext();
MutableTrackingEventDetails details = new MutableTrackingEventDetails(0.0f);
diff --git c/openfeature-sdk/src/test/java/dev/openfeature/sdk/e2e/ContextStoringProvider.java i/openfeature-sdk/src/test/java/dev/openfeature/sdk/e2e/ContextStoringProvider.java
index a3e6e4e..3b94b10 100644
--- c/openfeature-sdk/src/test/java/dev/openfeature/sdk/e2e/ContextStoringProvider.java
+++ i/openfeature-sdk/src/test/java/dev/openfeature/sdk/e2e/ContextStoringProvider.java
@@ -5,9 +5,7 @@ import dev.openfeature.api.FeatureProvider;
import dev.openfeature.api.Metadata;
import dev.openfeature.api.ProviderEvaluation;
import dev.openfeature.api.Value;
-import lombok.Getter;
-@Getter
public class ContextStoringProvider implements FeatureProvider {
private EvaluationContext evaluationContext;
@@ -45,4 +43,8 @@ public class ContextStoringProvider implements FeatureProvider {
this.evaluationContext = ctx;
return null;
}
+
+ public EvaluationContext getEvaluationContext() {
+ return evaluationContext;
+ }
}
diff --git c/openfeature-sdk/src/test/java/dev/openfeature/sdk/e2e/MockHook.java i/openfeature-sdk/src/test/java/dev/openfeature/sdk/e2e/MockHook.java
index d7ae779..2806b74 100644
--- c/openfeature-sdk/src/test/java/dev/openfeature/sdk/e2e/MockHook.java
+++ i/openfeature-sdk/src/test/java/dev/openfeature/sdk/e2e/MockHook.java
@@ -7,22 +7,16 @@ import dev.openfeature.api.HookContext;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
-import lombok.Getter;
public class MockHook implements Hook {
- @Getter
private boolean beforeCalled;
- @Getter
private boolean afterCalled;
- @Getter
private boolean errorCalled;
- @Getter
private boolean finallyAfterCalled;
- @Getter
private final Map<String, FlagEvaluationDetails> evaluationDetails = new HashMap<>();
@Override
@@ -47,4 +41,24 @@ public class MockHook implements Hook {
finallyAfterCalled = true;
evaluationDetails.put("finally", details);
}
+
+ public boolean isBeforeCalled() {
+ return beforeCalled;
+ }
+
+ public boolean isAfterCalled() {
+ return afterCalled;
+ }
+
+ public boolean isErrorCalled() {
+ return errorCalled;
+ }
+
+ public boolean isFinallyAfterCalled() {
+ return finallyAfterCalled;
+ }
+
+ public Map<String, FlagEvaluationDetails> getEvaluationDetails() {
+ return evaluationDetails;
+ }
}
diff --git c/openfeature-sdk/src/test/java/dev/openfeature/sdk/e2e/steps/StepDefinitions.java i/openfeature-sdk/src/test/java/dev/openfeature/sdk/e2e/steps/StepDefinitions.java
index d8b90ea..b1ff355 100644
--- c/openfeature-sdk/src/test/java/dev/openfeature/sdk/e2e/steps/StepDefinitions.java
+++ i/openfeature-sdk/src/test/java/dev/openfeature/sdk/e2e/steps/StepDefinitions.java
@@ -20,7 +20,6 @@ import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;
import java.util.HashMap;
import java.util.Map;
-import lombok.SneakyThrows;
public class StepDefinitions {
@@ -49,10 +48,9 @@ public class StepDefinitions {
private int typeErrorDefaultValue;
private FlagEvaluationDetails<Integer> typeErrorDetails;
- @SneakyThrows
@BeforeAll()
@Given("a provider is registered")
- public static void setup() {
+ public static void setup() throws Exception {
Map<String, Flag<?>> flags = buildFlags();
InMemoryProvider provider = new InMemoryProvider(flags);
OpenFeatureAPI api = new DefaultOpenFeatureAPI();
diff --git c/openfeature-sdk/src/test/java/dev/openfeature/sdk/fixtures/ProviderFixture.java i/openfeature-sdk/src/test/java/dev/openfeature/sdk/fixtures/ProviderFixture.java
index e9b1cfc..4c7fc05 100644
--- c/openfeature-sdk/src/test/java/dev/openfeature/sdk/fixtures/ProviderFixture.java
+++ i/openfeature-sdk/src/test/java/dev/openfeature/sdk/fixtures/ProviderFixture.java
@@ -12,12 +12,14 @@ import dev.openfeature.api.ImmutableContext;
import dev.openfeature.api.ProviderState;
import java.io.FileNotFoundException;
import java.util.concurrent.CountDownLatch;
-import lombok.experimental.UtilityClass;
import org.mockito.stubbing.Answer;
-@UtilityClass
public class ProviderFixture {
+ private ProviderFixture() {
+ // Utility class
+ }
+
public static FeatureProvider createMockedProvider() {
FeatureProvider provider = mock(FeatureProvider.class);
doReturn(ProviderState.NOT_READY).when(provider).getState();
diff --git c/openfeature-sdk/src/test/java/dev/openfeature/sdk/hooks/logging/LoggingHookTest.java i/openfeature-sdk/src/test/java/dev/openfeature/sdk/hooks/logging/LoggingHookTest.java
index 5ab180f..18cffed 100644
--- c/openfeature-sdk/src/test/java/dev/openfeature/sdk/hooks/logging/LoggingHookTest.java
+++ i/openfeature-sdk/src/test/java/dev/openfeature/sdk/hooks/logging/LoggingHookTest.java
@@ -18,7 +18,6 @@ import dev.openfeature.api.HookContext;
import dev.openfeature.api.ImmutableContext;
import dev.openfeature.api.Metadata;
import dev.openfeature.api.exceptions.GeneralError;
-import lombok.SneakyThrows;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.simplify4u.slf4jmock.LoggerMock;
@@ -73,9 +72,8 @@ class LoggingHookTest {
LoggerMock.setMock(LoggingHook.class, logger);
}
- @SneakyThrows
@Test
- void beforeLogsAllPropsExceptEvaluationContext() {
+ void beforeLogsAllPropsExceptEvaluationContext() throws Exception {
LoggingHook hook = new LoggingHook();
hook.before(hookContext, null);
@@ -85,9 +83,8 @@ class LoggingHookTest {
verify(mockBuilder).log(argThat((String s) -> s.contains("Before")));
}
- @SneakyThrows
@Test
- void beforeLogsAllPropsAndEvaluationContext() {
+ void beforeLogsAllPropsAndEvaluationContext() throws Exception {
LoggingHook hook = new LoggingHook(true);
hook.before(hookContext, null);
@@ -97,9 +94,8 @@ class LoggingHookTest {
verify(mockBuilder).log(argThat((String s) -> s.contains("Before")));
}
- @SneakyThrows
@Test
- void afterLogsAllPropsExceptEvaluationContext() {
+ void afterLogsAllPropsExceptEvaluationContext() throws Exception {
LoggingHook hook = new LoggingHook();
FlagEvaluationDetails<Object> details = FlagEvaluationDetails.builder()
.reason(REASON)
@@ -115,9 +111,8 @@ class LoggingHookTest {
verify(mockBuilder).log(argThat((String s) -> s.contains("After")));
}
- @SneakyThrows
@Test
- void afterLogsAllPropsAndEvaluationContext() {
+ void afterLogsAllPropsAndEvaluationContext() throws Exception {
LoggingHook hook = new LoggingHook(true);
FlagEvaluationDetails<Object> details = FlagEvaluationDetails.builder()
.reason(REASON)
@@ -133,9 +128,8 @@ class LoggingHookTest {
verify(mockBuilder).log(argThat((String s) -> s.contains("After")));
}
- @SneakyThrows
@Test
- void errorLogsAllPropsExceptEvaluationContext() {
+ void errorLogsAllPropsExceptEvaluationContext() throws Exception {
LoggingHook hook = new LoggingHook();
GeneralError error = new GeneralError(ERROR_MESSAGE);
hook.error(hookContext, error, null);
@@ -147,9 +141,8 @@ class LoggingHookTest {
verify(mockBuilder).log(argThat((String s) -> s.contains("Error")), any(Exception.class));
}
- @SneakyThrows
@Test
- void errorLogsAllPropsAndEvaluationContext() {
+ void errorLogsAllPropsAndEvaluationContext() throws Exception {
LoggingHook hook = new LoggingHook(true);
GeneralError error = new GeneralError(ERROR_MESSAGE);
hook.error(hookContext, error, null);
diff --git c/openfeature-sdk/src/test/java/dev/openfeature/sdk/providers/memory/InMemoryProviderTest.java i/openfeature-sdk/src/test/java/dev/openfeature/sdk/providers/memory/InMemoryProviderTest.java
index 87e0d65..96f7beb 100644
--- c/openfeature-sdk/src/test/java/dev/openfeature/sdk/providers/memory/InMemoryProviderTest.java
+++ i/openfeature-sdk/src/test/java/dev/openfeature/sdk/providers/memory/InMemoryProviderTest.java
@@ -26,7 +26,6 @@ import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Consumer;
-import lombok.SneakyThrows;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -37,9 +36,8 @@ class InMemoryProviderTest {
private InMemoryProvider provider;
private OpenFeatureAPI api;
- @SneakyThrows
@BeforeEach
- void beforeEach() {
+ void beforeEach() throws Exception {
final var configChangedEventCounter = new AtomicInteger();
Map<String, Flag<?>> flags = buildFlags();
provider = spy(new InMemoryProvider(flags));
@@ -105,9 +103,8 @@ class InMemoryProviderTest {
});
}
- @SneakyThrows
@Test
- void shouldThrowIfNotInitialized() {
+ void shouldThrowIfNotInitialized() throws Exception {
InMemoryProvider inMemoryProvider = new InMemoryProvider(new HashMap<>());
// ErrorCode.PROVIDER_NOT_READY should be returned when evaluated via the client
diff --git c/openfeature-sdk/src/test/java/dev/openfeature/sdk/testutils/TestEventsProvider.java i/openfeature-sdk/src/test/java/dev/openfeature/sdk/testutils/TestEventsProvider.java
index bbb2f07..b5a0635 100644
--- c/openfeature-sdk/src/test/java/dev/openfeature/sdk/testutils/TestEventsProvider.java
+++ i/openfeature-sdk/src/test/java/dev/openfeature/sdk/testutils/TestEventsProvider.java
@@ -10,7 +10,6 @@ import dev.openfeature.api.Value;
import dev.openfeature.api.exceptions.FatalError;
import dev.openfeature.api.exceptions.GeneralError;
import dev.openfeature.sdk.EventProvider;
-import lombok.SneakyThrows;
public class TestEventsProvider extends EventProvider {
public static final String PASSED_IN_DEFAULT = "Passed in default";
@@ -42,8 +41,7 @@ public class TestEventsProvider extends EventProvider {
this.isFatalInitError = fatal;
}
- @SneakyThrows
- public static TestEventsProvider newInitializedTestEventsProvider() {
+ public static TestEventsProvider newInitializedTestEventsProvider() throws Exception {
TestEventsProvider provider = new TestEventsProvider();
provider.initialize(null);
return provider;
diff --git c/openfeature-sdk/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java i/openfeature-sdk/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java
index 7c71e06..41a02cc 100644
--- c/openfeature-sdk/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java
+++ i/openfeature-sdk/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java
@@ -8,14 +8,15 @@ import dev.openfeature.api.Value;
import dev.openfeature.sdk.providers.memory.Flag;
import java.util.HashMap;
import java.util.Map;
-import lombok.experimental.UtilityClass;
-
/**
* Test flags utils.
*/
-@UtilityClass
public class TestFlagsUtils {
+ private TestFlagsUtils() {
+ // Utility class
+ }
+
public static final String BOOLEAN_FLAG_KEY = "boolean-flag";
public static final String STRING_FLAG_KEY = "string-flag";
public static final String INT_FLAG_KEY = "integer-flag";
diff --git c/openfeature-sdk/src/test/java/dev/openfeature/sdk/testutils/stubbing/ConditionStubber.java i/openfeature-sdk/src/test/java/dev/openfeature/sdk/testutils/stubbing/ConditionStubber.java
index 886a7bb..e99cc84 100644
--- c/openfeature-sdk/src/test/java/dev/openfeature/sdk/testutils/stubbing/ConditionStubber.java
+++ i/openfeature-sdk/src/test/java/dev/openfeature/sdk/testutils/stubbing/ConditionStubber.java
@@ -5,13 +5,15 @@ import static org.mockito.Mockito.doAnswer;
import java.time.Duration;
import java.util.concurrent.CountDownLatch;
-import lombok.experimental.UtilityClass;
import org.mockito.stubbing.Answer;
import org.mockito.stubbing.Stubber;
-@UtilityClass
public class ConditionStubber {
+ private ConditionStubber() {
+ // Utility class
+ }
+
@SuppressWarnings("java:S2925")
public static Stubber doDelayResponse(Duration duration) {
return doAnswer(invocation -> {
diff --git c/pom.xml.backup i/pom.xml.backup
deleted file mode 100644
index 3a12111..0000000
--- c/pom.xml.backup
+++ /dev/null
@@ -1,718 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>dev.openfeature</groupId>
- <artifactId>sdk</artifactId>
- <version>1.16.0</version> <!--x-release-please-version -->
-
- <properties>
- <toolchain.jdk.version>[17,)</toolchain.jdk.version>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.compiler.source>11</maven.compiler.source>
- <maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
- <org.mockito.version>5.18.0</org.mockito.version>
- <!-- exclusion expression for e2e tests -->
- <testExclusions>**/e2e/*.java</testExclusions>
- <module-name>${project.groupId}.${project.artifactId}</module-name>
- <skip.tests>false</skip.tests>
- <!-- this will throw an error if we use wrong apis -->
- <maven.compiler.release>11</maven.compiler.release>
- </properties>
-
- <name>OpenFeature Java SDK</name>
- <description>This is the Java implementation of OpenFeature, a vendor-agnostic abstraction library for evaluating
- feature flags.
- </description>
- <url>https://openfeature.dev</url>
- <developers>
- <developer>
- <id>abrahms</id>
- <name>Justin Abrahms</name>
- <organization>eBay</organization>
- <url>https://justin.abrah.ms/</url>
- </developer>
- </developers>
- <licenses>
- <license>
- <name>Apache License 2.0</name>
- <url>https://www.apache.org/licenses/LICENSE-2.0</url>
- </license>
- </licenses>
-
- <scm>
- <connection>scm:git:https://github.com/open-feature/java-sdk.git</connection>
- <developerConnection>scm:git:https://github.com/open-feature/java-sdk.git</developerConnection>
- <url>https://github.com/open-feature/java-sdk</url>
- </scm>
-
- <dependencies>
-
- <dependency>
- <groupId>org.projectlombok</groupId>
- <artifactId>lombok</artifactId>
- <version>1.18.38</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <!-- used so that lombok can generate suppressions for spotbugs. It needs to find it on the relevant classpath -->
- <groupId>com.github.spotbugs</groupId>
- <artifactId>spotbugs</artifactId>
- <version>4.8.6</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>2.0.17</version>
- </dependency>
-
- <!-- test -->
- <dependency>
- <groupId>com.tngtech.archunit</groupId>
- <artifactId>archunit-junit5</artifactId>
- <version>1.4.1</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <version>${org.mockito.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <version>3.27.3</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-engine</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-api</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-params</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.junit.platform</groupId>
- <artifactId>junit-platform-suite</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>io.cucumber</groupId>
- <artifactId>cucumber-java</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>io.cucumber</groupId>
- <artifactId>cucumber-junit-platform-engine</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>io.cucumber</groupId>
- <artifactId>cucumber-picocontainer</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.simplify4u</groupId>
- <artifactId>slf4j2-mock</artifactId>
- <version>2.4.0</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <version>33.4.8-jre</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.awaitility</groupId>
- <artifactId>awaitility</artifactId>
- <version>4.3.0</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.openjdk.jmh</groupId>
- <artifactId>jmh-core</artifactId>
- <version>1.37</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <dependencyManagement>
- <dependencies>
-
- <!-- Start mockito workaround -->
- <!-- https://github.com/mockito/mockito/issues/3121 -->
- <!-- These are transitive dependencies of mockito we are forcing -->
- <dependency>
- <groupId>net.bytebuddy</groupId>
- <artifactId>byte-buddy</artifactId>
- <version>1.17.6</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>net.bytebuddy</groupId>
- <artifactId>byte-buddy-agent</artifactId>
- <version>1.17.6</version>
- <scope>test</scope>
- </dependency>
- <!-- End mockito workaround-->
-
- <dependency>
- <groupId>io.cucumber</groupId>
- <artifactId>cucumber-bom</artifactId>
- <version>7.27.0</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
-
- <dependency>
- <groupId>org.junit</groupId>
- <artifactId>junit-bom</artifactId>
- <version>5.13.4</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
-
- </dependencies>
- </dependencyManagement>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-toolchains-plugin</artifactId>
- <version>3.2.0</version>
- <executions>
- <execution>
- <goals>
- <goal>select-jdk-toolchain</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.cyclonedx</groupId>
- <artifactId>cyclonedx-maven-plugin</artifactId>
- <version>2.9.1</version>
- <configuration>
- <projectType>library</projectType>
- <schemaVersion>1.3</schemaVersion>
- <includeBomSerialNumber>true</includeBomSerialNumber>
- <includeCompileScope>true</includeCompileScope>
- <includeProvidedScope>true</includeProvidedScope>
- <includeRuntimeScope>true</includeRuntimeScope>
- <includeSystemScope>true</includeSystemScope>
- <includeTestScope>false</includeTestScope>
- <includeLicenseText>false</includeLicenseText>
- <outputFormat>all</outputFormat>
- </configuration>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>makeAggregateBom</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.14.0</version>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>3.5.3</version>
- <configuration>
- <forkCount>1</forkCount>
- <reuseForks>false</reuseForks>
- <argLine>
- ${surefireArgLine}
- --add-opens java.base/java.util=ALL-UNNAMED
- --add-opens java.base/java.lang=ALL-UNNAMED
- </argLine>
- <excludes>
- <!-- tests to exclude -->
- <exclude>${testExclusions}</exclude>
- </excludes>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <version>3.5.3</version>
- <configuration>
- <argLine>
- ${surefireArgLine}
- </argLine>
- </configuration>
- </plugin>
-
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>3.4.2</version>
- <configuration>
- <archive>
- <manifestEntries>
- <Automatic-Module-Name>${module-name}</Automatic-Module-Name>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>codequality</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>3.8.1</version>
- <executions>
- <execution>
- <phase>verify</phase>
- <goals>
- <goal>analyze</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <failOnWarning>true</failOnWarning>
- <ignoredUnusedDeclaredDependencies>
- <ignoredUnusedDeclaredDependency>com.github.spotbugs:*</ignoredUnusedDeclaredDependency>
- <ignoredUnusedDeclaredDependency>org.junit*</ignoredUnusedDeclaredDependency>
- <ignoredUnusedDeclaredDependency>com.tngtech.archunit*</ignoredUnusedDeclaredDependency>
- <ignoredUnusedDeclaredDependency>org.simplify4u:slf4j2-mock*</ignoredUnusedDeclaredDependency>
- </ignoredUnusedDeclaredDependencies>
- <ignoredDependencies>
- <ignoredDependency>com.google.guava*</ignoredDependency>
- <ignoredDependency>io.cucumber*</ignoredDependency>
- <ignoredDependency>org.junit*</ignoredDependency>
- <ignoredDependency>com.tngtech.archunit*</ignoredDependency>
- <ignoredDependency>com.google.code.findbugs*</ignoredDependency>
- <ignoredDependency>com.github.spotbugs*</ignoredDependency>
- <ignoredDependency>org.simplify4u:slf4j-mock-common:*</ignoredDependency>
- </ignoredDependencies>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <version>0.8.13</version>
-
- <executions>
- <execution>
- <id>prepare-agent</id>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
-
- <configuration>
- <destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
- <propertyName>surefireArgLine</propertyName>
- </configuration>
- </execution>
-
- <execution>
- <id>report</id>
- <phase>verify</phase>
- <goals>
- <goal>report</goal>
- </goals>
-
- <configuration>
- <dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
- <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
- </configuration>
- </execution>
-
- <execution>
- <id>jacoco-check</id>
- <goals>
- <goal>check</goal>
- </goals>
- <configuration>
- <dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
- <excludes>
- <exclude>dev/openfeature/sdk/exceptions/**</exclude>
- </excludes>
-
- <rules>
- <rule>
- <element>PACKAGE</element>
- <limits>
- <limit>
- <counter>LINE</counter>
- <value>COVEREDRATIO</value>
- <minimum>0.80</minimum>
- </limit>
- </limits>
- </rule>
- </rules>
- </configuration>
- </execution>
-
- </executions>
- </plugin>
- <plugin>
- <groupId>com.github.spotbugs</groupId>
- <artifactId>spotbugs-maven-plugin</artifactId>
- <version>4.9.3.2</version>
- <configuration>
- <excludeFilterFile>spotbugs-exclusions.xml</excludeFilterFile>
- <plugins>
- <plugin>
- <groupId>com.h3xstream.findsecbugs</groupId>
- <artifactId>findsecbugs-plugin</artifactId>
- <version>1.14.0</version>
- </plugin>
- </plugins>
- </configuration>
- <dependencies>
- <!-- overwrite dependency on spotbugs if you want to specify the version of spotbugs -->
- <dependency>
- <groupId>com.github.spotbugs</groupId>
- <artifactId>spotbugs</artifactId>
- <version>4.8.6</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>run-spotbugs</id>
- <phase>verify</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>3.6.0</version>
- <configuration>
- <configLocation>checkstyle.xml</configLocation>
- <consoleOutput>true</consoleOutput>
- <failsOnError>true</failsOnError>
- <linkXRef>false</linkXRef>
- </configuration>
- <dependencies>
- <dependency>
- <groupId>com.puppycrawl.tools</groupId>
- <artifactId>checkstyle</artifactId>
- <version>10.26.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>validate</id>
- <phase>validate</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>com.diffplug.spotless</groupId>
- <artifactId>spotless-maven-plugin</artifactId>
- <version>2.46.1</version>
- <configuration>
- <!-- optional: limit format enforcement to just the files changed by this feature branch -->
- <!-- <ratchetFrom>origin/main</ratchetFrom>-->
- <formats>
- <!-- you can define as many formats as you want, each is independent -->
- <format>
- <!-- define the files to apply to -->
- <includes>
- <include>.gitattributes</include>
- <include>.gitignore</include>
- </includes>
- <!-- define the steps to apply to those files -->
- <trimTrailingWhitespace/>
- <endWithNewline/>
- <indent>
- <spaces>true</spaces>
- <spacesPerTab>4</spacesPerTab>
- </indent>
- </format>
- </formats>
- <!-- define a language-specific format -->
- <java>
- <palantirJavaFormat/>
-
- <indent>
- <spaces>true</spaces>
- <spacesPerTab>4</spacesPerTab>
- </indent>
- <importOrder/>
-
- <removeUnusedImports/>
- <formatAnnotations/>
-
- </java>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>deploy</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <build>
-
- <plugins>
- <!-- Begin publish to maven central -->
- <plugin>
- <groupId>org.sonatype.central</groupId>
- <artifactId>central-publishing-maven-plugin</artifactId>
- <version>0.8.0</version>
- <extensions>true</extensions>
- <configuration>
- <publishingServerId>central</publishingServerId>
- <autoPublish>true</autoPublish>
- </configuration>
- </plugin>
- <!-- End publish to maven central -->
-
- <!-- Begin source & javadocs being generated -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <version>3.3.1</version>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>jar-no-fork</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>3.11.2</version>
- <configuration>
- <failOnWarnings>true</failOnWarnings>
- <doclint>all,-missing
- </doclint> <!-- ignore missing javadoc, these are enforced with more customizability in the checkstyle plugin -->
- </configuration>
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <!-- end source & javadoc -->
-
- <!-- sign the jars -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-gpg-plugin</artifactId>
- <version>3.2.8</version>
- <executions>
- <execution>
- <id>sign-artifacts</id>
- <phase>install</phase>
- <goals>
- <goal>sign</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <!-- end sign -->
- </plugins>
- </build>
- </profile>
-
- <profile>
- <id>benchmark</id>
- <build>
- <plugins>
- <plugin>
- <groupId>pw.krejci</groupId>
- <artifactId>jmh-maven-plugin</artifactId>
- <version>0.2.2</version>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
- <id>e2e</id>
- <properties>
- <!-- run the e2e tests by clearing the exclusions -->
- <testExclusions/>
- </properties>
- <build>
- <plugins>
- <!-- pull the gherkin tests as a git submodule -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>3.5.1</version>
- <executions>
- <execution>
- <id>update-test-harness-submodule</id>
- <phase>validate</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <!-- run: git submodule update \-\-init \-\-recursive -->
- <executable>git</executable>
- <arguments>
- <argument>submodule</argument>
- <argument>update</argument>
- <argument>--init</argument>
- <argument>spec</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <!-- profile for running tests under java 11 (used mostly in CI) -->
- <!-- selected automatically by JDK activation (see https://maven.apache.org/guides/introduction/introduction-to-profiles.html#implicit-profile-activation) -->
- <profile>
- <id>java11</id>
- <!-- with the next block we can define a set of sdks which still support java 8, if any of the sdks is not supporting java 8 anymore -->
- <!--<modules><module></module></modules>-->
- <properties>
- <toolchain.jdk.version>[11,)</toolchain.jdk.version>
- <skip.tests>true</skip.tests>
- </properties>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-toolchains-plugin</artifactId>
- <version>3.2.0</version>
- <executions>
- <execution>
- <goals>
- <goal>select-jdk-toolchain</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>3.5.3</version>
- <configuration>
- <argLine>
- ${surefireArgLine}
- </argLine>
- <excludes>
- <!-- tests to exclude -->
- <exclude>${testExclusions}</exclude>
- </excludes>
-
- <skipTests>${skip.tests}</skipTests>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <version>3.5.3</version>
- <configuration>
- <argLine>
- ${surefireArgLine}
- </argLine>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.14.0</version>
- <executions>
- <execution>
- <id>default-testCompile</id>
- <phase>test-compile</phase>
- <goals>
- <goal>testCompile</goal>
- </goals>
- <configuration>
- <skip>true</skip>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
- <distributionManagement>
- <snapshotRepository>
- <id>central</id>
- <url>https://central.sonatype.com/repository/maven-snapshots/</url>
- </snapshotRepository>
- </distributionManagement>
-
-</project>
diff --git c/src/lombok.config i/src/lombok.config
deleted file mode 100644
index ec3b056..0000000
--- c/src/lombok.config
+++ /dev/null
@@ -1,2 +0,0 @@
-lombok.addLombokGeneratedAnnotation = true
-lombok.extern.findbugs.addSuppressFBWarnings = true
diff --git c/src/main/java/dev/openfeature/sdk/AbstractStructure.java i/src/main/java/dev/openfeature/sdk/AbstractStructure.java
deleted file mode 100644
index 7962705..0000000
--- c/src/main/java/dev/openfeature/sdk/AbstractStructure.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package dev.openfeature.sdk;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import lombok.EqualsAndHashCode;
-
-@SuppressWarnings({"PMD.BeanMembersShouldSerialize", "checkstyle:MissingJavadocType"})
-@EqualsAndHashCode
-abstract class AbstractStructure implements Structure {
-
- protected final Map<String, Value> attributes;
-
- @Override
- public boolean isEmpty() {
- return attributes == null || attributes.isEmpty();
- }
-
- AbstractStructure() {
- this.attributes = new HashMap<>();
- }
-
- AbstractStructure(Map<String, Value> attributes) {
- this.attributes = attributes;
- }
-
- /**
- * Returns an unmodifiable representation of the internal attribute map.
- *
- * @return immutable map
- */
- public Map<String, Value> asUnmodifiableMap() {
- return Collections.unmodifiableMap(attributes);
- }
-
- /**
- * Get all values as their underlying primitives types.
- *
- * @return all attributes on the structure into a Map
- */
- @Override
- public Map<String, Object> asObjectMap() {
- return attributes.entrySet().stream()
- // custom collector, workaround for Collectors.toMap in JDK8
- // https://bugs.openjdk.org/browse/JDK-8148463
- .collect(
- HashMap::new,
- (accumulated, entry) -> accumulated.put(entry.getKey(), convertValue(entry.getValue())),
- HashMap::putAll);
- }
-}
diff --git c/src/main/java/dev/openfeature/sdk/Awaitable.java i/src/main/java/dev/openfeature/sdk/Awaitable.java
deleted file mode 100644
index 7d5f477..0000000
--- c/src/main/java/dev/openfeature/sdk/Awaitable.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package dev.openfeature.sdk;
-
-/**
- * A class to help with synchronization by allowing the optional awaiting of the associated action.
- */
-public class Awaitable {
-
- /**
- * An already-completed Awaitable. Awaiting this will return i…1 parent f7a0e08 commit 624c4de
149 files changed
Lines changed: 77 additions & 12419 deletions
File tree
- openfeature-sdk/src/test/java/dev/openfeature/sdk
- e2e
- steps
- fixtures
- hooks/logging
- providers/memory
- testutils
- stubbing
- src
- main/java/dev/openfeature/sdk
- exceptions
- hooks/logging
- internal
- providers/memory
- test
- java/dev/openfeature/sdk
- arch
- benchmark
- e2e
- steps
- exceptions
- fixtures
- hooks/logging
- internal
- providers/memory
- testutils
- exception
- stubbing
- resources/features
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| |||
120 | 119 | | |
121 | 120 | | |
122 | 121 | | |
123 | | - | |
124 | 122 | | |
125 | 123 | | |
| 124 | + | |
126 | 125 | | |
127 | | - | |
| 126 | + | |
128 | 127 | | |
129 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
| |||
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
34 | | - | |
| 32 | + | |
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
| |||
97 | 95 | | |
98 | 96 | | |
99 | 97 | | |
100 | | - | |
101 | 98 | | |
102 | 99 | | |
103 | | - | |
| 100 | + | |
104 | 101 | | |
105 | 102 | | |
106 | 103 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
687 | 686 | | |
688 | 687 | | |
689 | 688 | | |
690 | | - | |
691 | | - | |
| 689 | + | |
692 | 690 | | |
693 | 691 | | |
694 | 692 | | |
| |||
Lines changed: 4 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
34 | 32 | | |
35 | | - | |
| 33 | + | |
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
41 | | - | |
42 | 39 | | |
43 | | - | |
| 40 | + | |
44 | 41 | | |
45 | 42 | | |
46 | 43 | | |
| |||
53 | 50 | | |
54 | 51 | | |
55 | 52 | | |
56 | | - | |
57 | 53 | | |
58 | 54 | | |
59 | 55 | | |
60 | 56 | | |
61 | 57 | | |
62 | | - | |
| 58 | + | |
63 | 59 | | |
64 | 60 | | |
65 | 61 | | |
66 | 62 | | |
67 | 63 | | |
68 | | - | |
69 | 64 | | |
70 | | - | |
| 65 | + | |
71 | 66 | | |
72 | 67 | | |
73 | 68 | | |
| |||
Lines changed: 4 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | | - | |
60 | | - | |
| 58 | + | |
61 | 59 | | |
62 | 60 | | |
63 | 61 | | |
| |||
91 | 89 | | |
92 | 90 | | |
93 | 91 | | |
94 | | - | |
95 | 92 | | |
96 | 93 | | |
97 | 94 | | |
98 | 95 | | |
99 | 96 | | |
100 | | - | |
| 97 | + | |
101 | 98 | | |
102 | 99 | | |
103 | 100 | | |
| |||
110 | 107 | | |
111 | 108 | | |
112 | 109 | | |
113 | | - | |
114 | 110 | | |
115 | 111 | | |
116 | 112 | | |
117 | 113 | | |
118 | 114 | | |
119 | | - | |
| 115 | + | |
120 | 116 | | |
121 | 117 | | |
122 | 118 | | |
| |||
361 | 357 | | |
362 | 358 | | |
363 | 359 | | |
364 | | - | |
365 | 360 | | |
366 | | - | |
| 361 | + | |
367 | 362 | | |
368 | 363 | | |
369 | 364 | | |
| |||
Lines changed: 12 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
| |||
443 | 442 | | |
444 | 443 | | |
445 | 444 | | |
446 | | - | |
447 | 445 | | |
448 | | - | |
| 446 | + | |
449 | 447 | | |
450 | 448 | | |
451 | 449 | | |
| |||
468 | 466 | | |
469 | 467 | | |
470 | 468 | | |
471 | | - | |
472 | 469 | | |
473 | | - | |
| 470 | + | |
474 | 471 | | |
475 | 472 | | |
476 | 473 | | |
| |||
552 | 549 | | |
553 | 550 | | |
554 | 551 | | |
555 | | - | |
| 552 | + | |
556 | 553 | | |
557 | 554 | | |
558 | 555 | | |
| |||
570 | 567 | | |
571 | 568 | | |
572 | 569 | | |
573 | | - | |
| 570 | + | |
574 | 571 | | |
575 | 572 | | |
576 | 573 | | |
| |||
584 | 581 | | |
585 | 582 | | |
586 | 583 | | |
587 | | - | |
| 584 | + | |
588 | 585 | | |
589 | 586 | | |
590 | 587 | | |
| |||
630 | 627 | | |
631 | 628 | | |
632 | 629 | | |
633 | | - | |
| 630 | + | |
634 | 631 | | |
635 | 632 | | |
636 | 633 | | |
| |||
655 | 652 | | |
656 | 653 | | |
657 | 654 | | |
658 | | - | |
| 655 | + | |
659 | 656 | | |
660 | 657 | | |
661 | 658 | | |
| |||
681 | 678 | | |
682 | 679 | | |
683 | 680 | | |
684 | | - | |
| 681 | + | |
685 | 682 | | |
686 | 683 | | |
687 | 684 | | |
| |||
749 | 746 | | |
750 | 747 | | |
751 | 748 | | |
752 | | - | |
| 749 | + | |
753 | 750 | | |
754 | 751 | | |
755 | 752 | | |
| |||
773 | 770 | | |
774 | 771 | | |
775 | 772 | | |
776 | | - | |
| 773 | + | |
777 | 774 | | |
778 | 775 | | |
779 | 776 | | |
| |||
792 | 789 | | |
793 | 790 | | |
794 | 791 | | |
795 | | - | |
| 792 | + | |
796 | 793 | | |
797 | 794 | | |
798 | 795 | | |
| |||
806 | 803 | | |
807 | 804 | | |
808 | 805 | | |
809 | | - | |
810 | 806 | | |
811 | | - | |
| 807 | + | |
812 | 808 | | |
813 | 809 | | |
814 | 810 | | |
| |||
openfeature-sdk/src/test/java/dev/openfeature/sdk/ThreadLocalTransactionContextPropagatorTest.java
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
36 | 34 | | |
37 | | - | |
| 35 | + | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| |||
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
57 | | - | |
58 | | - | |
| 56 | + | |
59 | 57 | | |
60 | 58 | | |
61 | 59 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | | - | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
| |||
45 | 43 | | |
46 | 44 | | |
47 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
0 commit comments