99import io .split .engine .evaluator .Evaluator ;
1010import io .split .engine .SDKReadinessGates ;
1111import io .split .engine .evaluator .EvaluatorImp ;
12- import io .split .inputValidation .*;
12+ import io .split .engine .evaluator .Labels ;
13+
1314import io .split .engine .metrics .Metrics ;
1415import io .split .grammar .Treatments ;
16+ import io .split .inputValidation .EventsValidator ;
17+ import io .split .inputValidation .InputValidationResult ;
18+ import io .split .inputValidation .KeyValidator ;
19+ import io .split .inputValidation .SplitNameValidator ;
20+ import io .split .inputValidation .TrafficTypeValidator ;
1521import org .slf4j .Logger ;
1622import org .slf4j .LoggerFactory ;
1723
@@ -31,7 +37,7 @@ public final class SplitClientImpl implements SplitClient {
3137 public static final SplitResult SPLIT_RESULT_CONTROL = new SplitResult (Treatments .CONTROL , null );
3238
3339 private static final String GET_TREATMENT_LABEL = "sdk.getTreatment" ;
34- private static final String DEFINITION_NOT_FOUND = "definition not found " ;
40+ private static final String GET_TREATMENT_WITH_CONFIG_LABEL = "sdk.getTreatmentWithConfig " ;
3541
3642 private static final Logger _log = LoggerFactory .getLogger (SplitClientImpl .class );
3743
@@ -79,17 +85,17 @@ public String getTreatment(Key key, String split, Map<String, Object> attributes
7985
8086 @ Override
8187 public SplitResult getTreatmentWithConfig (String key , String split ) {
82- return getTreatmentWithConfigInternal (GET_TREATMENT_LABEL , key , null , split , Collections .<String , Object >emptyMap (), "getTreatmentWithConfig" );
88+ return getTreatmentWithConfigInternal (GET_TREATMENT_WITH_CONFIG_LABEL , key , null , split , Collections .<String , Object >emptyMap (), "getTreatmentWithConfig" );
8389 }
8490
8591 @ Override
8692 public SplitResult getTreatmentWithConfig (String key , String split , Map <String , Object > attributes ) {
87- return getTreatmentWithConfigInternal (GET_TREATMENT_LABEL , key , null , split , attributes , "getTreatmentWithConfig" );
93+ return getTreatmentWithConfigInternal (GET_TREATMENT_WITH_CONFIG_LABEL , key , null , split , attributes , "getTreatmentWithConfig" );
8894 }
8995
9096 @ Override
9197 public SplitResult getTreatmentWithConfig (Key key , String split , Map <String , Object > attributes ) {
92- return getTreatmentWithConfigInternal (GET_TREATMENT_LABEL , key .matchingKey (), key .bucketingKey (), split , attributes , "getTreatmentWithConfig" );
98+ return getTreatmentWithConfigInternal (GET_TREATMENT_WITH_CONFIG_LABEL , key .matchingKey (), key .bucketingKey (), split , attributes , "getTreatmentWithConfig" );
9399 }
94100
95101 @ Override
@@ -197,7 +203,7 @@ private SplitResult getTreatmentWithConfigInternal(String label, String matching
197203
198204 EvaluatorImp .TreatmentLabelAndChangeNumber result = _evaluator .evaluateFeature (matchingKey , bucketingKey , split , attributes );
199205
200- if (result .treatment .equals (Treatments .CONTROL ) && result .label .equals (DEFINITION_NOT_FOUND ) && _gates .isSDKReadyNow ()) {
206+ if (result .treatment .equals (Treatments .CONTROL ) && result .label .equals (Labels . DEFINITION_NOT_FOUND ) && _gates .isSDKReadyNow ()) {
201207 _log .warn (
202208 "getTreatment: you passed \" " + split + "\" that does not exist in this environment, " +
203209 "please double check what Splits exist in the web console." );
0 commit comments