Browse Source

Rename readData() to readPrimitiveField() in JavaNano.

Jisi Liu 11 years ago
parent
commit
cd99c12df2

+ 1 - 1
javanano/src/main/java/com/google/protobuf/nano/CodedInputByteBufferNano.java

@@ -640,7 +640,7 @@ public final class CodedInputByteBufferNano {
   }
 
   // Read a primitive type.
-  Object readData(int type) throws IOException {
+  Object readPrimitiveField(int type) throws IOException {
     switch (type) {
       case InternalNano.TYPE_DOUBLE:
           return readDouble();

+ 1 - 1
javanano/src/main/java/com/google/protobuf/nano/Extension.java

@@ -338,7 +338,7 @@ public class Extension<M extends ExtendableMessageNano<M>, T> {
         @Override
         protected Object readData(CodedInputByteBufferNano input) {
             try {
-              return input.readData(type);
+              return input.readPrimitiveField(type);
             } catch (IOException e) {
                 throw new IllegalArgumentException("Error reading extension field", e);
             }

+ 2 - 2
javanano/src/main/java/com/google/protobuf/nano/InternalNano.java

@@ -421,12 +421,12 @@ public final class InternalNano {
         break;
       }
       if (tag == keyTag) {
-        key = (K) input.readData(keyType);
+        key = (K) input.readPrimitiveField(keyType);
       } else if (tag == valueTag) {
         if (valueType == TYPE_MESSAGE) {
           input.readMessage((MessageNano) value);
         } else {
-          value = (V) input.readData(valueType);
+          value = (V) input.readPrimitiveField(valueType);
         }
       } else {
         if (!input.skipField(tag)) {