We recently migrated a codebase to Java 5.0 and several people users of
IDEA 5.1.2 have reported that lines of code like
MessageFormat.format(" ", "Zulu", "Xraf");
are marked up as errors ("format (String java.lang.Object) in
MessageFormat cannot be applied to..."). But, invocations of vararg
methods defined in our own code work fine. The language level on this
project is set to 5.0 and the code compiles without error.
Even more strange, I changed the language level of a simple test project
from 5.0 to 1.4, reloaded the project as prompted, and vararg methods in
my own code were STILL not flagged as errors, though other 5.0
language features (for-each loops for example) were.
I did some searching in JIRA but didn't find anything. Any thoughts?