fix: removed javax.nullable annotations (#921)
removing nullable annotation Signed-off-by: DBlanchard88 <davidblanchard88@gmail.com> Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
This commit is contained in:
parent
3f8c009139
commit
cd7470dd7a
|
|
@ -1,6 +1,5 @@
|
|||
package dev.openfeature.sdk;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.Nullable;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
|
|
@ -19,8 +18,8 @@ public class EventDetails extends ProviderEventDetails {
|
|||
|
||||
static EventDetails fromProviderEventDetails(
|
||||
ProviderEventDetails providerEventDetails,
|
||||
@Nullable String providerName,
|
||||
@Nullable String clientName) {
|
||||
String providerName,
|
||||
String clientName) {
|
||||
return EventDetails.builder()
|
||||
.clientName(clientName)
|
||||
.providerName(providerName)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package dev.openfeature.sdk;
|
|||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -41,7 +40,7 @@ class EventSupport {
|
|||
* @param event the event type
|
||||
* @param eventDetails the event details
|
||||
*/
|
||||
public void runClientHandlers(@Nullable String clientName, ProviderEvent event, EventDetails eventDetails) {
|
||||
public void runClientHandlers(String clientName, ProviderEvent event, EventDetails eventDetails) {
|
||||
clientName = Optional.ofNullable(clientName)
|
||||
.orElse(defaultClientUuid);
|
||||
|
||||
|
|
@ -74,7 +73,7 @@ class EventSupport {
|
|||
* @param event the event type
|
||||
* @param handler the handler function to run
|
||||
*/
|
||||
public void addClientHandler(@Nullable String clientName, ProviderEvent event, Consumer<EventDetails> handler) {
|
||||
public void addClientHandler(String clientName, ProviderEvent event, Consumer<EventDetails> handler) {
|
||||
final String name = Optional.ofNullable(clientName)
|
||||
.orElse(defaultClientUuid);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ package dev.openfeature.sdk;
|
|||
|
||||
import java.util.Optional;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -23,12 +21,9 @@ public class FlagEvaluationDetails<T> implements BaseEvaluation<T> {
|
|||
|
||||
private String flagKey;
|
||||
private T value;
|
||||
@Nullable
|
||||
private String variant;
|
||||
@Nullable
|
||||
private String reason;
|
||||
private ErrorCode errorCode;
|
||||
@Nullable
|
||||
private String errorMessage;
|
||||
@Builder.Default
|
||||
private ImmutableMetadata flagMetadata = ImmutableMetadata.builder().build();
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@ import java.util.Optional;
|
|||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import dev.openfeature.sdk.exceptions.OpenFeatureError;
|
||||
import dev.openfeature.sdk.internal.AutoCloseableLock;
|
||||
import dev.openfeature.sdk.internal.AutoCloseableReentrantReadWriteLock;
|
||||
|
|
@ -67,14 +65,14 @@ public class OpenFeatureAPI implements EventBus<OpenFeatureAPI> {
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public Client getClient(@Nullable String name) {
|
||||
public Client getClient(String name) {
|
||||
return getClient(name, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public Client getClient(@Nullable String name, @Nullable String version) {
|
||||
public Client getClient(String name, String version) {
|
||||
return new OpenFeatureClient(this,
|
||||
name,
|
||||
version);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package dev.openfeature.sdk;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -18,10 +16,10 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
public class ProviderEvaluation<T> implements BaseEvaluation<T> {
|
||||
T value;
|
||||
@Nullable String variant;
|
||||
@Nullable private String reason;
|
||||
String variant;
|
||||
private String reason;
|
||||
ErrorCode errorCode;
|
||||
@Nullable private String errorMessage;
|
||||
private String errorMessage;
|
||||
@Builder.Default
|
||||
private ImmutableMetadata flagMetadata = ImmutableMetadata.builder().build();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ package dev.openfeature.sdk;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
|
|
@ -12,7 +10,7 @@ import lombok.experimental.SuperBuilder;
|
|||
*/
|
||||
@Data @SuperBuilder(toBuilder = true)
|
||||
public class ProviderEventDetails {
|
||||
@Nullable private List<String> flagsChanged;
|
||||
@Nullable private String message;
|
||||
@Nullable private ImmutableMetadata eventMetadata;
|
||||
private List<String> flagsChanged;
|
||||
private String message;
|
||||
private ImmutableMetadata eventMetadata;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@ import java.util.function.Consumer;
|
|||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import dev.openfeature.sdk.exceptions.GeneralError;
|
||||
import dev.openfeature.sdk.exceptions.OpenFeatureError;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -100,7 +98,7 @@ class ProviderRepository {
|
|||
prepareAndInitializeProvider(clientName, provider, afterSet, afterInit, afterShutdown, afterError, waitForInit);
|
||||
}
|
||||
|
||||
private void prepareAndInitializeProvider(@Nullable String clientName,
|
||||
private void prepareAndInitializeProvider(String clientName,
|
||||
FeatureProvider newProvider,
|
||||
Consumer<FeatureProvider> afterSet,
|
||||
Consumer<FeatureProvider> afterInit,
|
||||
|
|
|
|||
Loading…
Reference in New Issue