Skip to content

Commit

Permalink
refactor: Rename Exceptions class
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziodemaria committed May 21, 2024
1 parent 8e4167a commit b2265a5
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/spotify/confidence/Confidence.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.google.common.io.Closer;
import com.spotify.confidence.ConfidenceExceptions.IllegalValuePath;
import com.spotify.confidence.ConfidenceExceptions.IllegalValueType;
import com.spotify.confidence.ConfidenceExceptions.IncompatibleValueType;
import com.spotify.confidence.ConfidenceExceptions.ValueNotFound;
import com.spotify.confidence.ConfidenceUtils.FlagPath;
import com.spotify.confidence.Exceptions.IllegalValuePath;
import com.spotify.confidence.Exceptions.IllegalValueType;
import com.spotify.confidence.Exceptions.IncompatibleValueType;
import com.spotify.confidence.Exceptions.ValueNotFound;
import com.spotify.confidence.shaded.flags.resolver.v1.ResolveFlagsResponse;
import com.spotify.confidence.shaded.flags.resolver.v1.ResolvedFlag;
import io.grpc.ManagedChannel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import static com.spotify.confidence.OpenFeatureUtils.getValueForPath;

import com.google.protobuf.Struct;
import com.spotify.confidence.ConfidenceExceptions.IllegalValuePath;
import com.spotify.confidence.ConfidenceUtils.FlagPath;
import com.spotify.confidence.Exceptions.IllegalValuePath;
import com.spotify.confidence.shaded.flags.resolver.v1.ResolveFlagsResponse;
import com.spotify.confidence.shaded.flags.resolver.v1.ResolvedFlag;
import dev.openfeature.sdk.EvaluationContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.spotify.confidence;

import com.google.protobuf.Struct;
import com.spotify.confidence.ConfidenceExceptions.IllegalValueType;
import com.spotify.confidence.ConfidenceExceptions.IncompatibleValueType;
import com.spotify.confidence.ConfidenceExceptions.ParseError;
import com.spotify.confidence.Exceptions.IllegalValueType;
import com.spotify.confidence.Exceptions.IncompatibleValueType;
import com.spotify.confidence.Exceptions.ParseError;
import com.spotify.confidence.shaded.flags.types.v1.FlagSchema;
import com.spotify.confidence.shaded.flags.types.v1.FlagSchema.SchemaTypeCase;
import com.spotify.confidence.shaded.flags.types.v1.FlagSchema.StructFlagSchema;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/spotify/confidence/ConfidenceUtils.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.spotify.confidence;

import com.spotify.confidence.ConfidenceExceptions.IllegalValuePath;
import com.spotify.confidence.ConfidenceExceptions.ValueNotFound;
import com.spotify.confidence.ConfidenceValue.Struct;
import com.spotify.confidence.Exceptions.IllegalValuePath;
import com.spotify.confidence.Exceptions.ValueNotFound;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.spotify.confidence;

public class ConfidenceExceptions {
public class Exceptions {

public static class ValueNotFound extends Exception {
public ValueNotFound(String message) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,7 @@ public void regularResolveWithPath() {
assertThat(evaluationDetails.getVariant()).isBlank();
assertThat(evaluationDetails.getReason()).isEqualTo("ERROR");
assertThat(evaluationDetails.getErrorMessage())
.isEqualTo(
"com.spotify.confidence.ConfidenceExceptions$IllegalValuePath: Illegal path string '...'");
.isEqualTo("com.spotify.confidence.Exceptions$IllegalValuePath: Illegal path string '...'");
assertThat(evaluationDetails.getValue()).isEqualTo(DEFAULT_VALUE);
}

Expand Down

0 comments on commit b2265a5

Please sign in to comment.