We have a Java EE 6 JSF project running on JDK 7 and JBoss EAP 6.
We have a utily class around the message bundles where we have two methods with the same name, but different parameters and making use of varargs:
public void doSomething(String name) {..}
public void doSomething(String name, Object... params) {..}
When using these methods within an EL expression in an XHTML page, we have the strange behaviour that the application produced a NPE in the customers test environment (Linux, JDK 7 Update 91), but not in ours (Windows, JDK 7 Update 80) and after digging a bit deeper it turned out, that it happenend within the invokeMethod(..)
of JBoss EL API because of selecting the wrong method - the 2nd one was taken despite the fact that only 1 parameter was given within the EL expression.
We have yet to check what differs exactly between the two testing environments besides the mentioned above and of course it's easy to fix by renaming one of the methods - but has anyone experienced this behaviour and can tell me why it happens?