@@ -48,6 +48,7 @@ public final class SplitClientImpl implements SplitClient {
4848 public static final SplitResult SPLIT_RESULT_CONTROL = new SplitResult (Treatments .CONTROL , null );
4949 private static final String CLIENT_DESTROY = "Client has already been destroyed - no calls possible" ;
5050 private static final String CATCHALL_EXCEPTION = "CatchAll Exception" ;
51+ private static final String MATCHING_KEY = "matchingKey" ;
5152
5253 private static final Logger _log = LoggerFactory .getLogger (SplitClientImpl .class );
5354
@@ -321,7 +322,7 @@ private SplitResult getTreatmentWithConfigInternal(String matchingKey, String bu
321322 return SPLIT_RESULT_CONTROL ;
322323 }
323324
324- if (!KeyValidator .isValid (matchingKey , "matchingKey" , _config .maxStringLength (), methodEnum .getMethod ())) {
325+ if (!KeyValidator .isValid (matchingKey , MATCHING_KEY , _config .maxStringLength (), methodEnum .getMethod ())) {
325326 return SPLIT_RESULT_CONTROL ;
326327 }
327328
@@ -462,7 +463,7 @@ private Map<String, SplitResult> validateBeforeEvaluateByFlagSets(String matchin
462463 _log .error (CLIENT_DESTROY );
463464 return new HashMap <>();
464465 }
465- if (!KeyValidator .isValid (matchingKey , "matchingKey" , _config .maxStringLength (), methodEnum .getMethod ())) {
466+ if (!KeyValidator .isValid (matchingKey , MATCHING_KEY , _config .maxStringLength (), methodEnum .getMethod ())) {
466467 return new HashMap <>();
467468 }
468469 if (!KeyValidator .bucketingKeyIsValid (bucketingKey , _config .maxStringLength (), methodEnum .getMethod ())) {
@@ -476,7 +477,7 @@ private Map<String, SplitResult> validateBeforeEvaluate(List<String> featureFlag
476477 _log .error (CLIENT_DESTROY );
477478 return createMapControl (featureFlagNames );
478479 }
479- if (!KeyValidator .isValid (matchingKey , "matchingKey" , _config .maxStringLength (), methodEnum .getMethod ())) {
480+ if (!KeyValidator .isValid (matchingKey , MATCHING_KEY , _config .maxStringLength (), methodEnum .getMethod ())) {
480481 return createMapControl (featureFlagNames );
481482 }
482483 if (!KeyValidator .bucketingKeyIsValid (bucketingKey , _config .maxStringLength (), methodEnum .getMethod ())) {
0 commit comments