Commit 84f6954c authored by Feng Xiao's avatar Feng Xiao

Fix Java build.

parent acde1651
...@@ -34,6 +34,11 @@ ...@@ -34,6 +34,11 @@
<artifactId>easymockclassextension</artifactId> <artifactId>easymockclassextension</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -1516,7 +1516,8 @@ public class MapTest extends TestCase { ...@@ -1516,7 +1516,8 @@ public class MapTest extends TestCase {
} }
try { try {
builder.putAllInt32ToMessageField(newMap(4, null, 5, null)); builder.putAllInt32ToMessageField(
MapTest.<Integer, MessageValue>newMap(4, null, 5, null));
fail(); fail();
} catch (NullPointerException expected) { } catch (NullPointerException expected) {
} }
......
...@@ -104,7 +104,8 @@ public class JsonFormat { ...@@ -104,7 +104,8 @@ public class JsonFormat {
*/ */
public static Printer printer() { public static Printer printer() {
return new 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 { ...@@ -167,7 +168,7 @@ public class JsonFormat {
return new Printer( return new Printer(
registry, registry,
true, true,
Collections.emptySet(), Collections.<FieldDescriptor>emptySet(),
preservingProtoFieldNames, preservingProtoFieldNames,
omittingInsignificantWhitespace); omittingInsignificantWhitespace);
} }
......
...@@ -1319,7 +1319,7 @@ public class JsonFormatTest extends TestCase { ...@@ -1319,7 +1319,7 @@ public class JsonFormatTest extends TestCase {
} }
try { try {
JsonFormat.printer().includingDefaultValueFields(Collections.emptySet()); JsonFormat.printer().includingDefaultValueFields(Collections.<FieldDescriptor>emptySet());
fail("IllegalArgumentException is expected."); fail("IllegalArgumentException is expected.");
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
// Expected. // Expected.
......
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