Hi folks,

The following code in commons-io (1.3.2) throws an NPE exception:

org.apache.commons.io.FilenameUtils
    .equalsNormalizedOnSystem(
            "//a.html",
            "//ab.html");

And here is the exception:

java.lang.NullPointerException: The strings must not be null
   at org.apache.commons.io.IOCase.checkEquals(IOCase.java:141)
   at org.apache.commons.io.FilenameUtils.equals(FilenameUtils.java:984)
at org.apache.commons.io.FilenameUtils.equalsNormalizedOnSystem(FilenameUtils.java:956)
   at CodeSnippet_32.run(CodeSnippet_32.java:4)
at org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain1.eval(ScrapbookMain1.java:20)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain.evalLoop(ScrapbookMain.java:54) at org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain.main(ScrapbookMain.java:35)

I think it is wrong the message "The strings must not be null", since there is not a null string involved in the call.

Interesting is that is both or 1 of the strings is null it did not throws an exception.

Should I fill a JIRA issue for that?

Many thanks in advance for your reply.

Best Regards,

Antonio Gallardo.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to