Commit 81f4fe5a authored by Feng Xiao's avatar Feng Xiao Committed by GitHub

Merge pull request #2827 from xfxyjwf/i1251

Update comments for setSizeLimit.
parents 616e68ec 03c8c8be
...@@ -354,9 +354,9 @@ public abstract class CodedInputStream { ...@@ -354,9 +354,9 @@ public abstract class CodedInputStream {
* *
* <p>Set the maximum message size. In order to prevent malicious messages from exhausting memory * <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 * 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 * default limit is {@code Integer.MAX_INT}. You should set this limit as small as you can without
* functionality. Note that size limits only apply when reading from an {@code InputStream}, not * harming your app's functionality. Note that size limits only apply when reading from an
* when constructed around a raw byte array (nor with {@link ByteString#newCodedInput}). * {@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 * <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. * #resetSizeCounter()} after each one to avoid hitting the size limit.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment