Don't call toString() on plain Java arrays Error Prone will soon warn about calling toString() on plain Java arrays, because the return value is rarely useful. In JsoTest, we don't actually care about what it returns because the cast to String[][] should throw an exception anyway, but presumably we want to make sure the variable doesn't get discarded as dead and the cast optimized away. Instead of applying the Error Prone automated refactoring of calling java.util.Arrays.toString(), we can just call getClass() instead. Change-Id: I2e90cf1442d126efe8d7ec866204f20c5e4cf3e9
diff --git a/user/test/com/google/gwt/dev/jjs/test/JsoTest.java b/user/test/com/google/gwt/dev/jjs/test/JsoTest.java index 059d1c9..9164f25 100644 --- a/user/test/com/google/gwt/dev/jjs/test/JsoTest.java +++ b/user/test/com/google/gwt/dev/jjs/test/JsoTest.java
@@ -407,7 +407,7 @@ assertFalse(o instanceof String[][]); try { String[][] s = (String[][]) o; - s.toString(); + s.getClass(); fail("Expected ClassCastException"); } catch (ClassCastException expected) { }