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

Fix Java build.

parent acde1651
......@@ -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>
......
......@@ -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) {
}
......
......@@ -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);
}
......
......@@ -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.
......
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