From bf483dfb99a5b7c57ee0a222bd041275cda9cf98 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Fri, 7 Apr 2017 14:50:52 +0900 Subject: Allow unknown values for Map put*Value methods just like every other enum mutation method. --- java/util/src/test/java/com/google/protobuf/util/JsonFormatTest.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'java/util') diff --git a/java/util/src/test/java/com/google/protobuf/util/JsonFormatTest.java b/java/util/src/test/java/com/google/protobuf/util/JsonFormatTest.java index 808e542d..33bc1403 100644 --- a/java/util/src/test/java/com/google/protobuf/util/JsonFormatTest.java +++ b/java/util/src/test/java/com/google/protobuf/util/JsonFormatTest.java @@ -229,9 +229,7 @@ public class JsonFormatTest extends TestCase { TestMap.Builder mapBuilder = TestMap.newBuilder(); mapBuilder.putInt32ToEnumMapValue(1, 0); - Map mapWithInvalidValues = new HashMap(); - mapWithInvalidValues.put(2, 12345); - mapBuilder.putAllInt32ToEnumMapValue(mapWithInvalidValues); + mapBuilder.putInt32ToEnumMapValue(2, 12345); TestMap mapMessage = mapBuilder.build(); assertEquals( "{\n" -- cgit v1.2.3