You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2015/10/01 02:48:04 UTC

[jira] [Commented] (TIKA-1757) tika-batch tests fail on systems with whitespace or special chars in folder name

    [ https://issues.apache.org/jira/browse/TIKA-1757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14939120#comment-14939120 ] 

Hudson commented on TIKA-1757:
------------------------------

SUCCESS: Integrated in tika-trunk-jdk1.7 #861 (See [https://builds.apache.org/job/tika-trunk-jdk1.7/861/])
TIKA-1757 and TIKA-1758. Mea culpa.  Thank you Uwe Schindler and Yaniv Kinda (tallison: [http://svn.apache.org/viewvc/tika/trunk/?view=rev&rev=1706178])
* trunk/tika-app/src/test/java/org/apache/tika/cli/TikaCLIBatchCommandLineTest.java
* trunk/tika-app/src/test/java/org/apache/tika/cli/TikaCLIBatchIntegrationTest.java
* trunk/tika-batch/src/test/java/org/apache/tika/batch/CommandLineParserBuilderTest.java


> tika-batch tests fail on systems with whitespace or special chars in folder name
> --------------------------------------------------------------------------------
>
>                 Key: TIKA-1757
>                 URL: https://issues.apache.org/jira/browse/TIKA-1757
>             Project: Tika
>          Issue Type: Bug
>            Reporter: Uwe Schindler
>            Assignee: Tim Allison
>         Attachments: TIKA-1757.patch
>
>
> This is one problem that forbiddenapis des not catch, because the method affected has valid use cases: {{URL#getFile()}} or {{URL#getPath()}} both return the URL path, which should never be treated as a file system path (for file: URLs). This is breaks asap, if the path contains special characters which may not be part of URL. getFile() and getPath() return the encoded path.
> The correct way to transform a file URL to a file is: {{new File(url.toURI())}}. See also the list of "bad stuff" as listed by the Maven community for Mojos/Plugins.
> In fact the affected test should not use a file at all. Instead it should use {{Class#getResourceAsStream()}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)