Merge pull request #2832 from pherl/javaep

Fix java code according to error prone.
This commit is contained in:
Jisi Liu 2017-03-10 15:19:04 -08:00 committed by GitHub
commit f54fb9d729
2 changed files with 4 additions and 1 deletions

View file

@ -2602,6 +2602,9 @@ public final class TestUtil {
case FOO_CORD:
Assert.assertTrue(message.hasFooCord());
break;
case FOO_STRING_PIECE:
Assert.assertTrue(message.hasFooStringPiece());
break;
case FOO_BYTES:
Assert.assertTrue(message.hasFooBytes());
break;

View file

@ -345,7 +345,7 @@ void ImmutableMessageLiteGenerator::Generate(io::Printer* printer) {
}
printer->Print(
"@java.lang.SuppressWarnings(\"unchecked\")\n"
"@java.lang.SuppressWarnings({\"unchecked\", \"fallthrough\"})\n"
"protected final Object dynamicMethod(\n"
" com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,\n"
" Object arg0, Object arg1) {\n"