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
84f6954c
Commit
84f6954c
authored
Mar 29, 2017
by
Feng Xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Java build.
parent
acde1651
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
4 deletions
+11
-4
pom.xml
java/core/pom.xml
+5
-0
MapTest.java
java/core/src/test/java/com/google/protobuf/MapTest.java
+2
-1
JsonFormat.java
...il/src/main/java/com/google/protobuf/util/JsonFormat.java
+3
-2
JsonFormatTest.java
...rc/test/java/com/google/protobuf/util/JsonFormatTest.java
+1
-1
No files found.
java/core/pom.xml
View file @
84f6954c
...
...
@@ -34,6 +34,11 @@
<artifactId>
easymockclassextension
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
com.google.truth
</groupId>
<artifactId>
truth
</artifactId>
<scope>
test
</scope>
</dependency>
</dependencies>
<build>
...
...
java/core/src/test/java/com/google/protobuf/MapTest.java
View file @
84f6954c
...
...
@@ -1516,7 +1516,8 @@ public class MapTest extends TestCase {
}
try
{
builder
.
putAllInt32ToMessageField
(
newMap
(
4
,
null
,
5
,
null
));
builder
.
putAllInt32ToMessageField
(
MapTest
.<
Integer
,
MessageValue
>
newMap
(
4
,
null
,
5
,
null
));
fail
();
}
catch
(
NullPointerException
expected
)
{
}
...
...
java/util/src/main/java/com/google/protobuf/util/JsonFormat.java
View file @
84f6954c
...
...
@@ -104,7 +104,8 @@ public class JsonFormat {
*/
public
static
Printer
printer
()
{
return
new
Printer
(
TypeRegistry
.
getEmptyTypeRegistry
(),
false
,
Collections
.
emptySet
(),
false
,
false
);
TypeRegistry
.
getEmptyTypeRegistry
(),
false
,
Collections
.<
FieldDescriptor
>
emptySet
(),
false
,
false
);
}
/**
...
...
@@ -167,7 +168,7 @@ public class JsonFormat {
return
new
Printer
(
registry
,
true
,
Collections
.
emptySet
(),
Collections
.
<
FieldDescriptor
>
emptySet
(),
preservingProtoFieldNames
,
omittingInsignificantWhitespace
);
}
...
...
java/util/src/test/java/com/google/protobuf/util/JsonFormatTest.java
View file @
84f6954c
...
...
@@ -1319,7 +1319,7 @@ public class JsonFormatTest extends TestCase {
}
try
{
JsonFormat
.
printer
().
includingDefaultValueFields
(
Collections
.
emptySet
());
JsonFormat
.
printer
().
includingDefaultValueFields
(
Collections
.
<
FieldDescriptor
>
emptySet
());
fail
(
"IllegalArgumentException is expected."
);
}
catch
(
IllegalArgumentException
e
)
{
// Expected.
...
...
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