Skip to content

Commit c524cfd

Browse files
committed
Update based on review comments
1 parent 6080dc2 commit c524cfd

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

firebase-config/src/main/java/com/google/firebase/remoteconfig/FirebaseRemoteConfigException.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@
2121

2222
/** Base class for {@link FirebaseRemoteConfig} exceptions. */
2323
public class FirebaseRemoteConfigException extends FirebaseException {
24+
/** Code that specifies the type of exception. */
25+
private final Code code;
26+
2427
/** Creates a Firebase Remote Config exception with the given message. */
2528
public FirebaseRemoteConfigException(@NonNull String detailMessage) {
2629
super(detailMessage);
27-
this.code = null;
30+
this.code = Code.UNKNOWN;
2831
}
2932

3033
/** Creates a Firebase Remote Config exception with the given message and cause. */
3134
public FirebaseRemoteConfigException(@NonNull String detailMessage, @Nullable Throwable cause) {
3235
super(detailMessage, cause);
33-
this.code = null;
36+
this.code = Code.UNKNOWN;
3437
}
3538

36-
/** Code that specifies the type of exception. */
37-
@Nullable private final Code code;
38-
3939
/** Creates a Firebase Remote Config exception with the given message and Code. */
4040
public FirebaseRemoteConfigException(@NonNull String detailMessage, @NonNull Code code) {
4141
super(detailMessage);
@@ -89,10 +89,5 @@ private static SparseArray<Code> buildCodeList() {
8989
}
9090
return codes;
9191
}
92-
93-
@NonNull
94-
public static Code fromValue(int value) {
95-
return CODE_LIST.get(value, Code.UNKNOWN);
96-
}
9792
}
9893
}

firebase-config/src/main/java/com/google/firebase/remoteconfig/internal/ConfigAutoFetch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public void listenForNotifications() {
103103
} catch (IOException ex) {
104104
propagateErrors(
105105
new FirebaseRemoteConfigClientException(
106-
"Unable to parse ConfigUpdate.",
106+
"Unable to parse config update message.",
107107
ex.getCause(),
108108
FirebaseRemoteConfigException.Code.CONFIG_UPDATE_MESSAGE_UNAVAILABLE));
109109
} finally {

0 commit comments

Comments
 (0)