Rename readData() to readPrimitiveField() in JavaNano.

pull/204/head
Jisi Liu 10 years ago
parent 7f3693184a
commit cd99c12df2
  1. 2
      javanano/src/main/java/com/google/protobuf/nano/CodedInputByteBufferNano.java
  2. 2
      javanano/src/main/java/com/google/protobuf/nano/Extension.java
  3. 4
      javanano/src/main/java/com/google/protobuf/nano/InternalNano.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();

@ -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);
}

@ -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)) {

Loading…
Cancel
Save