diff --git a/javanano/src/main/java/com/google/protobuf/nano/CodedInputByteBufferNano.java b/javanano/src/main/java/com/google/protobuf/nano/CodedInputByteBufferNano.java index 58112c9a..b4f20fde 100644 --- a/javanano/src/main/java/com/google/protobuf/nano/CodedInputByteBufferNano.java +++ b/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(); diff --git a/javanano/src/main/java/com/google/protobuf/nano/Extension.java b/javanano/src/main/java/com/google/protobuf/nano/Extension.java index 40da3059..c29b030f 100644 --- a/javanano/src/main/java/com/google/protobuf/nano/Extension.java +++ b/javanano/src/main/java/com/google/protobuf/nano/Extension.java @@ -338,7 +338,7 @@ public class Extension, 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); } diff --git a/javanano/src/main/java/com/google/protobuf/nano/InternalNano.java b/javanano/src/main/java/com/google/protobuf/nano/InternalNano.java index fc0a36cd..8b2c57ad 100644 --- a/javanano/src/main/java/com/google/protobuf/nano/InternalNano.java +++ b/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)) {