aboutsummaryrefslogtreecommitdiffhomepage
path: root/javanano/src/main/java/com/google/protobuf/nano/InternalNano.java
diff options
context:
space:
mode:
authorGravatar Jisi Liu <jisi.liu@gmail.com>2015-02-05 17:38:07 -0800
committerGravatar Jisi Liu <jisi.liu@gmail.com>2015-02-05 17:38:07 -0800
commitb0f194885e79960210dab17c6bc68674b1eab764 (patch)
tree19584d9627a87a1533e3a984be17349ce6a47c66 /javanano/src/main/java/com/google/protobuf/nano/InternalNano.java
parentcd99c12df2521c3a78699f4ce5100c95ee944438 (diff)
Rename empty bytes in JavaNano.
Diffstat (limited to 'javanano/src/main/java/com/google/protobuf/nano/InternalNano.java')
-rw-r--r--javanano/src/main/java/com/google/protobuf/nano/InternalNano.java6
1 files changed, 3 insertions, 3 deletions
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 8b2c57ad..a9a459dd 100644
--- a/javanano/src/main/java/com/google/protobuf/nano/InternalNano.java
+++ b/javanano/src/main/java/com/google/protobuf/nano/InternalNano.java
@@ -352,13 +352,13 @@ public final class InternalNano {
}
return result;
}
- private static final byte[] emptyBytes = new byte[0];
+ private static final byte[] EMPTY_BYTES = new byte[0];
private static Object primitiveDefaultValue(int type) {
switch (type) {
case TYPE_BOOL:
return Boolean.FALSE;
case TYPE_BYTES:
- return emptyBytes;
+ return EMPTY_BYTES;
case TYPE_STRING:
return "";
case TYPE_FLOAT:
@@ -443,7 +443,7 @@ public final class InternalNano {
}
if (value == null) {
- // message type
+ // message type value will be initialized by code-gen.
value = (V) primitiveDefaultValue(valueType);
}