File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/main/java/com/google/firebase/remoteconfig/internal Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ public final class RemoteConfigServiceErrorResponse extends GenericJson {
40
40
.put ("INVALID_ARGUMENT" , RemoteConfigErrorCode .INVALID_ARGUMENT )
41
41
.build ();
42
42
43
+ private static final Pattern RC_ERROR_CODE_PATTERN = Pattern .compile ("^\\ [(\\ w+)\\ ]:.*$" );
44
+
43
45
@ Key ("error" )
44
46
private Map <String , Object > error ;
45
47
@@ -54,7 +56,7 @@ public RemoteConfigErrorCode getRemoteConfigErrorCode() {
54
56
return null ;
55
57
}
56
58
57
- Matcher errorMatcher = Pattern . compile ( "^ \\ [( \\ w+) \\ ]:.*$" ) .matcher (message );
59
+ Matcher errorMatcher = RC_ERROR_CODE_PATTERN .matcher (message );
58
60
if (errorMatcher .find ()) {
59
61
String errorCode = errorMatcher .group (1 );
60
62
return RC_ERROR_CODES .get (errorCode );
You can’t perform that action at this time.
0 commit comments