- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
43 lines
1.3 KiB
Java
43 lines
1.3 KiB
Java
package com.google.protobuf;
|
|
|
|
import java.util.Collections;
|
|
import java.util.List;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public class UninitializedMessageException extends RuntimeException {
|
|
private static final long serialVersionUID = -7466929953374883507L;
|
|
private final List<String> missingFields;
|
|
|
|
public UninitializedMessageException(MessageLite messageLite) {
|
|
super("Message was missing required fields. (Lite runtime could not determine which fields were missing).");
|
|
this.missingFields = null;
|
|
}
|
|
|
|
public UninitializedMessageException(List<String> list) {
|
|
super(buildDescription(list));
|
|
this.missingFields = list;
|
|
}
|
|
|
|
public List<String> getMissingFields() {
|
|
return Collections.unmodifiableList(this.missingFields);
|
|
}
|
|
|
|
public InvalidProtocolBufferException asInvalidProtocolBufferException() {
|
|
return new InvalidProtocolBufferException(getMessage());
|
|
}
|
|
|
|
private static String buildDescription(List<String> list) {
|
|
StringBuilder sb = new StringBuilder("Message missing required fields: ");
|
|
boolean z = true;
|
|
for (String str : list) {
|
|
if (z) {
|
|
z = false;
|
|
} else {
|
|
sb.append(", ");
|
|
}
|
|
sb.append(str);
|
|
}
|
|
return sb.toString();
|
|
}
|
|
}
|