am a76831c3: Merge "Fix how getRepeatedFieldArrayLength works"

* commit 'a76831c3629c3c1a9900984f3aea6306dbf0734c':
  Fix how getRepeatedFieldArrayLength works
pull/91/head
Max Cai 10 years ago committed by Android Git Automerger
commit 4be139dcd8
  1. 6
      java/src/main/java/com/google/protobuf/nano/WireFormatNano.java

@ -113,11 +113,7 @@ public final class WireFormatNano {
int arrayLength = 1; int arrayLength = 1;
int startPos = input.getPosition(); int startPos = input.getPosition();
input.skipField(tag); input.skipField(tag);
while (input.getBytesUntilLimit() > 0) { while (input.readTag() == tag) {
int thisTag = input.readTag();
if (thisTag != tag) {
break;
}
input.skipField(tag); input.skipField(tag);
arrayLength++; arrayLength++;
} }

Loading…
Cancel
Save