| OLD | NEW |
| 1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
| 2 // Copyright 2013 Google Inc. All rights reserved. | 2 // Copyright 2013 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 30 matching lines...) Expand all Loading... |
| 41 public class InvalidProtocolBufferNanoException extends IOException { | 41 public class InvalidProtocolBufferNanoException extends IOException { |
| 42 private static final long serialVersionUID = -1616151763072450476L; | 42 private static final long serialVersionUID = -1616151763072450476L; |
| 43 | 43 |
| 44 public InvalidProtocolBufferNanoException(final String description) { | 44 public InvalidProtocolBufferNanoException(final String description) { |
| 45 super(description); | 45 super(description); |
| 46 } | 46 } |
| 47 | 47 |
| 48 static InvalidProtocolBufferNanoException truncatedMessage() { | 48 static InvalidProtocolBufferNanoException truncatedMessage() { |
| 49 return new InvalidProtocolBufferNanoException( | 49 return new InvalidProtocolBufferNanoException( |
| 50 "While parsing a protocol message, the input ended unexpectedly " + | 50 "While parsing a protocol message, the input ended unexpectedly " + |
| 51 "in the middle of a field. This could mean either than the " + | 51 "in the middle of a field. This could mean either that the " + |
| 52 "input has been truncated or that an embedded message " + | 52 "input has been truncated or that an embedded message " + |
| 53 "misreported its own length."); | 53 "misreported its own length."); |
| 54 } | 54 } |
| 55 | 55 |
| 56 static InvalidProtocolBufferNanoException negativeSize() { | 56 static InvalidProtocolBufferNanoException negativeSize() { |
| 57 return new InvalidProtocolBufferNanoException( | 57 return new InvalidProtocolBufferNanoException( |
| 58 "CodedInputStream encountered an embedded string or message " + | 58 "CodedInputStream encountered an embedded string or message " + |
| 59 "which claimed to have negative size."); | 59 "which claimed to have negative size."); |
| 60 } | 60 } |
| 61 | 61 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 84 "Protocol message had too many levels of nesting. May be malicious. " + | 84 "Protocol message had too many levels of nesting. May be malicious. " + |
| 85 "Use CodedInputStream.setRecursionLimit() to increase the depth limit."); | 85 "Use CodedInputStream.setRecursionLimit() to increase the depth limit."); |
| 86 } | 86 } |
| 87 | 87 |
| 88 static InvalidProtocolBufferNanoException sizeLimitExceeded() { | 88 static InvalidProtocolBufferNanoException sizeLimitExceeded() { |
| 89 return new InvalidProtocolBufferNanoException( | 89 return new InvalidProtocolBufferNanoException( |
| 90 "Protocol message was too large. May be malicious. " + | 90 "Protocol message was too large. May be malicious. " + |
| 91 "Use CodedInputStream.setSizeLimit() to increase the size limit."); | 91 "Use CodedInputStream.setSizeLimit() to increase the size limit."); |
| 92 } | 92 } |
| 93 } | 93 } |
| OLD | NEW |