Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: third_party/protobuf/java/core/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Protocol Buffers - Google's data interchange format 1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved. 2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/ 3 // https://developers.google.com/protocol-buffers/
4 // 4 //
5 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
7 // met: 7 // met:
8 // 8 //
9 // * Redistributions of source code must retain the above copyright 9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer. 10 // notice, this list of conditions and the following disclaimer.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 static InvalidProtocolBufferException invalidTag() { 100 static InvalidProtocolBufferException invalidTag() {
101 return new InvalidProtocolBufferException( 101 return new InvalidProtocolBufferException(
102 "Protocol message contained an invalid tag (zero)."); 102 "Protocol message contained an invalid tag (zero).");
103 } 103 }
104 104
105 static InvalidProtocolBufferException invalidEndTag() { 105 static InvalidProtocolBufferException invalidEndTag() {
106 return new InvalidProtocolBufferException( 106 return new InvalidProtocolBufferException(
107 "Protocol message end-group tag did not match expected tag."); 107 "Protocol message end-group tag did not match expected tag.");
108 } 108 }
109 109
110 static InvalidProtocolBufferException invalidWireType() { 110 static InvalidWireTypeException invalidWireType() {
111 return new InvalidProtocolBufferException( 111 return new InvalidWireTypeException(
112 "Protocol message tag had invalid wire type."); 112 "Protocol message tag had invalid wire type.");
113 } 113 }
114 114
115 /**
116 * Exception indicating that and unexpected wire type was encountered for a fi eld.
117 */
118 @ExperimentalApi
119 public static class InvalidWireTypeException extends InvalidProtocolBufferExce ption {
120 private static final long serialVersionUID = 3283890091615336259L;
121
122 public InvalidWireTypeException(String description) {
123 super(description);
124 }
125 }
126
115 static InvalidProtocolBufferException recursionLimitExceeded() { 127 static InvalidProtocolBufferException recursionLimitExceeded() {
116 return new InvalidProtocolBufferException( 128 return new InvalidProtocolBufferException(
117 "Protocol message had too many levels of nesting. May be malicious. " + 129 "Protocol message had too many levels of nesting. May be malicious. " +
118 "Use CodedInputStream.setRecursionLimit() to increase the depth limit."); 130 "Use CodedInputStream.setRecursionLimit() to increase the depth limit.");
119 } 131 }
120 132
121 static InvalidProtocolBufferException sizeLimitExceeded() { 133 static InvalidProtocolBufferException sizeLimitExceeded() {
122 return new InvalidProtocolBufferException( 134 return new InvalidProtocolBufferException(
123 "Protocol message was too large. May be malicious. " + 135 "Protocol message was too large. May be malicious. " +
124 "Use CodedInputStream.setSizeLimit() to increase the size limit."); 136 "Use CodedInputStream.setSizeLimit() to increase the size limit.");
125 } 137 }
126 138
127 static InvalidProtocolBufferException parseFailure() { 139 static InvalidProtocolBufferException parseFailure() {
128 return new InvalidProtocolBufferException("Failed to parse the message."); 140 return new InvalidProtocolBufferException("Failed to parse the message.");
129 } 141 }
130 142
131 static InvalidProtocolBufferException invalidUtf8() { 143 static InvalidProtocolBufferException invalidUtf8() {
132 return new InvalidProtocolBufferException("Protocol message had invalid UTF- 8."); 144 return new InvalidProtocolBufferException("Protocol message had invalid UTF- 8.");
133 } 145 }
134 } 146 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698