formatter.format("%<s %s", "a", "b")
would throw a MissingFormatArgumentException when executed.
]]>Arrays.asList(...) before handling it off to a formatted.
]]>String.format("%d", "1") will generate an exception, since
the String "1" is incompatible with the format specifier %d.
]]>String dateString = getHeaderField(name); dateString.trim();
the programmer seems to be thinking that the trim() method will update the String referenced by dateString. But since Strings are immutable, the trim() function returns a new String value, which is being ignored here. The code should be corrected to:
]]>String dateString = getHeaderField(name); dateString = dateString.trim();
Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.
]]>