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
fbfdbe8a
Commit
fbfdbe8a
authored
Feb 19, 2015
by
Jisi Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use EMPTY_BYTES in WireFormatNano
parent
c265fbe3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
InternalNano.java
.../src/main/java/com/google/protobuf/nano/InternalNano.java
+1
-2
No files found.
javanano/src/main/java/com/google/protobuf/nano/InternalNano.java
View file @
fbfdbe8a
...
...
@@ -354,13 +354,12 @@ public final class InternalNano {
}
return
result
;
}
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
EMPTY_BYTES
;
return
WireFormatNano
.
EMPTY_BYTES
;
case
TYPE_STRING:
return
""
;
case
TYPE_FLOAT:
...
...
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