Explorar o código

Merge "Fix how getRepeatedFieldArrayLength works"

Max Cai %!s(int64=11) %!d(string=hai) anos
pai
achega
ec0e1c00e0

+ 1 - 5
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++;
     }