diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2017-03-10 15:02:52 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-10 15:02:52 -0800 |
commit | 81f4fe5aabb02a2cbad9b8dd139832cfda9c6f62 (patch) | |
tree | 74cb1ecc3496b108b773207848401dbc6b57c9c6 /java | |
parent | 616e68ecc1c997c8b4c22a708cc9f6605a329bef (diff) | |
parent | 03c8c8be6dbd667015257551550bc481ad60ee0b (diff) | |
download | protobuf-81f4fe5aabb02a2cbad9b8dd139832cfda9c6f62.tar.gz protobuf-81f4fe5aabb02a2cbad9b8dd139832cfda9c6f62.tar.bz2 protobuf-81f4fe5aabb02a2cbad9b8dd139832cfda9c6f62.zip |
Merge pull request #2827 from xfxyjwf/i1251
Update comments for setSizeLimit.
Diffstat (limited to 'java')
-rw-r--r-- | java/core/src/main/java/com/google/protobuf/CodedInputStream.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/java/core/src/main/java/com/google/protobuf/CodedInputStream.java b/java/core/src/main/java/com/google/protobuf/CodedInputStream.java index 14169dc4..239798e4 100644 --- a/java/core/src/main/java/com/google/protobuf/CodedInputStream.java +++ b/java/core/src/main/java/com/google/protobuf/CodedInputStream.java @@ -354,9 +354,9 @@ public abstract class CodedInputStream { * * <p>Set the maximum message size. In order to prevent malicious messages from exhausting memory * or causing integer overflows, {@code CodedInputStream} limits how large a message may be. The - * default limit is 64MB. You should set this limit as small as you can without harming your app's - * functionality. Note that size limits only apply when reading from an {@code InputStream}, not - * when constructed around a raw byte array (nor with {@link ByteString#newCodedInput}). + * default limit is {@code Integer.MAX_INT}. You should set this limit as small as you can without + * harming your app's functionality. Note that size limits only apply when reading from an + * {@code InputStream}, not when constructed around a raw byte array. * * <p>If you want to read several messages from a single CodedInputStream, you could call {@link * #resetSizeCounter()} after each one to avoid hitting the size limit. |