Commit cd99c12d authored by Jisi Liu's avatar Jisi Liu

Rename readData() to readPrimitiveField() in JavaNano.

parent 7f369318
......@@ -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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment