Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
b0f19488
Commit
b0f19488
authored
Feb 06, 2015
by
Jisi Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename empty bytes in JavaNano.
parent
cd99c12d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
InternalNano.java
.../src/main/java/com/google/protobuf/nano/InternalNano.java
+3
-3
NanoTest.java
...nano/src/test/java/com/google/protobuf/nano/NanoTest.java
+0
-1
No files found.
javanano/src/main/java/com/google/protobuf/nano/InternalNano.java
View file @
b0f19488
...
...
@@ -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
);
}
...
...
javanano/src/test/java/com/google/protobuf/nano/NanoTest.java
View file @
b0f19488
...
...
@@ -3742,7 +3742,6 @@ public class NanoTest extends TestCase {
byte
[]
output
=
MessageNano
.
toByteArray
(
origin
);
TestMap
parsed
=
new
TestMap
();
MessageNano
.
mergeFrom
(
parsed
,
output
);
// TODO(liujisi): Test missing key/value in parsing.
}
public
void
testMapSerializeRejectNull
()
throws
Exception
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment