[ https://issues.apache.org/jira/browse/NUTCH-1807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16315477#comment-16315477 ]
Sebastian Nagel commented on NUTCH-1807: ---------------------------------------- Fixed for 2.x with NUTCH-2264, should be done for 1.x as well. > avoid methods relying on system-specific default locale / charset > ----------------------------------------------------------------- > > Key: NUTCH-1807 > URL: https://issues.apache.org/jira/browse/NUTCH-1807 > Project: Nutch > Issue Type: Bug > Affects Versions: 1.8, 2.2.1 > Reporter: Sebastian Nagel > Priority: Minor > Fix For: 1.15 > > > Many methods in Java (and libraries) used to convert Strings, Numbers, Dates > rely on the system-specific default locale / character set. This may cause > strange behaviour and errors impossible to reproduce on other systems, see > [~thetaphi]'s [blog > post|http://blog.thetaphi.de/2012/07/default-locales-default-charsets-and.html], > and discussions in NUTCH-1693 and NUTCH-1554. > A search with the [forbidden-apis > client|https://code.google.com/p/forbidden-apis/wiki/CliUsage] shows 120 > calls of such methods in trunk (without test classes): > {code} > # compile Nutch before check: all tested class files > # are then located in build/ (including plugins) > % CLASSPATH=`find build/ -name '*.jar' | tr '\n' ':'` > % java -jar forbiddenapis-1.5.1.jar -d build/ -c $CLASSPATH \ > -b jdk-unsafe-1.8 -b commons-io-unsafe-2.4 > {code} > It is also possible to [integrate the check into the ant > build|https://code.google.com/p/forbidden-apis/wiki/AntUsage] (to avoid that > "forbidden" calls slip into the code again). -- This message was sent by Atlassian JIRA (v6.4.14#64029)