소스 검색

am a76831c3: Merge "Fix how getRepeatedFieldArrayLength works"

* commit 'a76831c3629c3c1a9900984f3aea6306dbf0734c':
  Fix how getRepeatedFieldArrayLength works
Max Cai 11 년 전
부모
커밋
4be139dcd8
1개의 변경된 파일1개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 5
      java/src/main/java/com/google/protobuf/nano/WireFormatNano.java

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