diff options
author | Bo Yang <teboring@google.com> | 2016-09-19 13:45:07 -0700 |
---|---|---|
committer | Bo Yang <teboring@google.com> | 2016-10-10 11:23:36 -0700 |
commit | cc8ca5b6a5478b40546d4206392eb1471454460d (patch) | |
tree | c0b45abfa16d7d373a6ea8f7fe50f1de00ab938e /java/core/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java | |
parent | 337a028bb65ccca4dda768695950b5aba53ae2c9 (diff) | |
download | protobuf-cc8ca5b6a5478b40546d4206392eb1471454460d.tar.gz protobuf-cc8ca5b6a5478b40546d4206392eb1471454460d.tar.bz2 protobuf-cc8ca5b6a5478b40546d4206392eb1471454460d.zip |
Integrate internal changes
Diffstat (limited to 'java/core/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java')
-rw-r--r-- | java/core/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/java/core/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java b/java/core/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java index 85ce7b24..55e33d21 100644 --- a/java/core/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java +++ b/java/core/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java @@ -107,11 +107,23 @@ public class InvalidProtocolBufferException extends IOException { "Protocol message end-group tag did not match expected tag."); } - static InvalidProtocolBufferException invalidWireType() { - return new InvalidProtocolBufferException( + static InvalidWireTypeException invalidWireType() { + return new InvalidWireTypeException( "Protocol message tag had invalid wire type."); } + /** + * Exception indicating that and unexpected wire type was encountered for a field. + */ + @ExperimentalApi + public static class InvalidWireTypeException extends InvalidProtocolBufferException { + private static final long serialVersionUID = 3283890091615336259L; + + public InvalidWireTypeException(String description) { + super(description); + } + } + static InvalidProtocolBufferException recursionLimitExceeded() { return new InvalidProtocolBufferException( "Protocol message had too many levels of nesting. May be malicious. " + |