GitHub user cpoerschke opened a pull request:
https://github.com/apache/lucene-solr/pull/152
LUCENE-6563: sun.jnu.encoding to match file.encoding system property
for https://issues.apache.org/jira/i#browse/LUCENE-6563
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/bloomberg/lucene-solr trunk-sun-jnu-encoding
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/lucene-solr/pull/152.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #152
----
commit 58baae43edff917d46d1799d0e24b7f7ab828565
Author: Christine Poerschke <[email protected]>
Date: 2015-06-12T19:00:25Z
LUCENE-????: changed common-build.xml to ensure sun.jnu.encoding matches
file.encoding system property
changes:
* adding -Dtests.sun.jnu.encoding to common-build.xml (it is to take the
same value as -Dtests.file.encoding)
* add to RunListenerPrintReproduceInfo.java (for illustration purposes
only) the sun.jnu.encoding system property
background:
* ant test -Dtestcase=TestVerboseFS -Dtests.method=testURI
-Dtests.file.encoding=UTF-8
fails (for example) with 'Oracle Corporation 1.8.0_45 (64-bit)' when the
default sun.jnu.encoding system property is (for example) ANSI_X3.4-1968
related links/tickets:
* https://netbeans.org/bugzilla/show_bug.cgi?id=246438#c24
* http://happygiraffe.net/blog/2009/09/24/java-platform-encoding/
* http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8003228
test failure details:
NOTE: reproduce with: ant test -Dtestcase=TestVerboseFS
-Dtests.method=testURI -Dtests.seed=31F5C6E85DAF4E6B -Dtests.slow=true
-Dtests.locale=no -Dtests.timezone=Australia/Melbourne -Dtests.asserts=true
-Dtests.file.encoding=UTF-8
0.12s | TestVerboseFS.testURI <<<
Throwable #1: java.nio.file.InvalidPathException: Malformed input or input
contains unmappable characters: ??
at
__randomizedtesting.SeedInfo.seed([31F5C6E85DAF4E6B:B847BD4395B0145A]:0)
at sun.nio.fs.UnixPath.encode(UnixPath.java:147)
at sun.nio.fs.UnixPath.<init>(UnixPath.java:71)
at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281)
at sun.nio.fs.AbstractPath.resolve(AbstractPath.java:53)
at
org.apache.lucene.mockfile.FilterPath.resolve(FilterPath.java:156)
at
org.apache.lucene.mockfile.MockFileSystemTestCase.testURI(MockFileSystemTestCase.java:71)
at java.lang.Thread.run(Thread.java:745)
test case code snippet:
MockFileSystemTestCase.testURI
...
69 assumeTrue(Charset.defaultCharset().name() + " can't encode chinese",
70
Charset.defaultCharset().newEncoder().canEncode("ä¸ÂÃ¥<9B>1/2"));
71 Path f3 = dir.resolve("ä¸ÂÃ¥<9B>1/2");
...
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]