You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "James E-J (JIRA)" <ji...@apache.org> on 2010/03/12 01:40:27 UTC

[jira] Commented: (SANSELAN-36) Sanselan tests fail on Windows

    [ https://issues.apache.org/jira/browse/SANSELAN-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844299#action_12844299 ] 

James E-J commented on SANSELAN-36:
-----------------------------------

Also had this problem- tests failed due to 
Had to ignore the tests using mvn -Dmaven.test.skip=true install

Error was:
Running org.apache.sanselan.formats.jpeg.exif.GpsTest
org.apache.maven.surefire.booter.SurefireExecutionException: org.apache.sanselan
.formats.jpeg.exif.GpsTest; nested exception is java.lang.ExceptionInInitializer
Error: null; nested exception is org.apache.maven.surefire.testset.TestSetFailed
Exception: org.apache.sanselan.formats.jpeg.exif.GpsTest; nested exception is ja
va.lang.ExceptionInInitializerError: null
org.apache.maven.surefire.testset.TestSetFailedException: org.apache.sanselan.fo
rmats.jpeg.exif.GpsTest; nested exception is java.lang.ExceptionInInitializerErr
or: null
java.lang.ExceptionInInitializerError
        at org.apache.sanselan.SanselanTest.<clinit>(SanselanTest.java:99)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
......................
....................... Long stack trace
.......................
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range:
 1
        at java.lang.String.charAt(String.java:686)
        at java.util.regex.Matcher.appendReplacement(Matcher.java:703)
        at java.util.regex.Matcher.replaceAll(Matcher.java:813)
        at java.lang.String.replaceAll(String.java:2189)
        at org.apache.sanselan.SanselanTestConstants.<clinit>(SanselanTestConsta
nts.java:24)
        ... 23 more

> Sanselan tests fail on Windows
> ------------------------------
>
>                 Key: SANSELAN-36
>                 URL: https://issues.apache.org/jira/browse/SANSELAN-36
>             Project: Commons Sanselan
>          Issue Type: Test
>            Reporter: Niall Pemberton
>            Priority: Minor
>
> A number of the Sanselan tests fail on windows - all related to the use of the following code with file paths:
> {code}
>        "...".replaceAll("\\\\", System.getProperty("file.separator")
> {code}
> The problem is on windows the file separator is a "back slash" character which needs to be escaped in regular expressions.
> This affects:
>     * SanselanTestConstants (causes ExceptionIntializedError  because the static PHIL_HARVEY_TEST_IMAGE_FOLDER fails when its being initialized with a StringIndexOutOfBoundsException)
>     * SanselanGuessFormatTest fails in testGuess_all() and testGuess_unknown() throwing StringIndexOutOfBoundsException
>     * PngMultipleRoundtripTest  fails in test() throwing StringIndexOutOfBoundsException

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.