summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorMax Cai <maxtroy@google.com>2014-08-07 10:40:43 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-08-05 00:20:55 +0000
commita76831c3629c3c1a9900984f3aea6306dbf0734c (patch)
tree298bf379e2d05489ab6d5907221d22778bb1e885 /java
parent4d11e705cb073e55283452e6fd50e3feff54f82c (diff)
parent1a46f49f5b41dc18db5a8f2c63b894c650887bc8 (diff)
downloadexternal_protobuf-a76831c3629c3c1a9900984f3aea6306dbf0734c.zip
external_protobuf-a76831c3629c3c1a9900984f3aea6306dbf0734c.tar.gz
external_protobuf-a76831c3629c3c1a9900984f3aea6306dbf0734c.tar.bz2
Merge "Fix how getRepeatedFieldArrayLength works"
Diffstat (limited to 'java')
-rw-r--r--java/src/main/java/com/google/protobuf/nano/WireFormatNano.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/java/src/main/java/com/google/protobuf/nano/WireFormatNano.java b/java/src/main/java/com/google/protobuf/nano/WireFormatNano.java
index 1ff8f06..a3405e5 100644
--- a/java/src/main/java/com/google/protobuf/nano/WireFormatNano.java
+++ b/java/src/main/java/com/google/protobuf/nano/WireFormatNano.java
@@ -113,11 +113,7 @@ public final class WireFormatNano {
int arrayLength = 1;
int startPos = input.getPosition();
input.skipField(tag);
- while (input.getBytesUntilLimit() > 0) {
- int thisTag = input.readTag();
- if (thisTag != tag) {
- break;
- }
+ while (input.readTag() == tag) {
input.skipField(tag);
arrayLength++;
}