@@ -36,26 +36,26 @@ public class ComposeHttpStatusCodeChecker implements HttpStatusCodeChecker {
3636 public ComposeHttpStatusCodeChecker (ComposeHttpStatusCodeCheckerConfig config ) {
3737 // Handle deprecated configuration for backward compatibility.
3838 if (areDeprecatedPropertiesUsed (config )) {
39- notRetryableErrorStatusCodes = buildPredicate (config , config .getDeprecatedCodePrefix (),
40- config .getDeprecatedErrorWhiteListPrefix (), DEFAULT_DEPRECATED_ERROR_CODES );
39+ notRetryableErrorStatusCodes = buildPredicate (config , config .getErrorCodePrefix (),
40+ config .getErrorWhiteListPrefix (), DEFAULT_DEPRECATED_ERROR_CODES );
4141 retryableErrorStatusCodes = integer -> false ;
4242 } else {
43- retryableErrorStatusCodes = buildPredicate (config , config .getRetryableCodePrefix (),
44- config .getRetryableWhiteListPrefix (), DEFAULT_RETRYABLE_ERROR_CODES );
45- notRetryableErrorStatusCodes = buildPredicate (config , config .getErrorCodePrefix (),
46- config .getErrorWhiteListPrefix (), DEFAULT_ERROR_CODES );
43+ retryableErrorStatusCodes = buildPredicate (config , config .getRetryableErrorCodePrefix (),
44+ config .getRetryableErrorWhiteListPrefix (), DEFAULT_RETRYABLE_ERROR_CODES );
45+ notRetryableErrorStatusCodes =
46+ buildPredicate (config , config .getNonRetryableErrorCodePrefix (),
47+ config .getNonRetryableErrorWhiteListPrefix (), DEFAULT_ERROR_CODES );
4748 }
4849 }
4950
5051 private boolean areDeprecatedPropertiesUsed (ComposeHttpStatusCodeCheckerConfig config ) {
51- boolean whiteListDefined =
52- !isNullOrWhitespaceOnly (config .getDeprecatedErrorWhiteListPrefix ());
53- boolean codeListDefined = !isNullOrWhitespaceOnly (config .getDeprecatedCodePrefix ());
52+ boolean whiteListDefined = !isNullOrWhitespaceOnly (config .getErrorWhiteListPrefix ());
53+ boolean codeListDefined = !isNullOrWhitespaceOnly (config .getErrorCodePrefix ());
5454
5555 return (whiteListDefined && !isNullOrWhitespaceOnly (
56- config .getProperties ().getProperty (config .getDeprecatedErrorWhiteListPrefix ())))
57- || (codeListDefined && !isNullOrWhitespaceOnly (
58- config .getProperties ().getProperty (config .getDeprecatedCodePrefix ())));
56+ config .getProperties ().getProperty (config .getErrorWhiteListPrefix ()))) ||
57+ (codeListDefined && !isNullOrWhitespaceOnly (
58+ config .getProperties ().getProperty (config .getErrorCodePrefix ())));
5959 }
6060
6161 private Predicate <Integer > buildPredicate (
@@ -157,17 +157,17 @@ public HttpResponseStatus checkStatus(int statusCode) {
157157 @ RequiredArgsConstructor (access = AccessLevel .PRIVATE )
158158 public static class ComposeHttpStatusCodeCheckerConfig {
159159
160- private final String deprecatedErrorWhiteListPrefix ;
161-
162- private final String deprecatedCodePrefix ;
163-
164160 private final String errorWhiteListPrefix ;
165161
166162 private final String errorCodePrefix ;
167163
168- private final String retryableWhiteListPrefix ;
164+ private final String nonRetryableErrorWhiteListPrefix ;
165+
166+ private final String nonRetryableErrorCodePrefix ;
167+
168+ private final String retryableErrorWhiteListPrefix ;
169169
170- private final String retryableCodePrefix ;
170+ private final String retryableErrorCodePrefix ;
171171
172172 private final Properties properties ;
173173 }
0 commit comments