commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Bodewig (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COMPRESS-387) Allow spaces in path for unit tests in Windows
Date Wed, 19 Apr 2017 12:44:41 GMT

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

Stefan Bodewig commented on COMPRESS-387:
-----------------------------------------

> Uwe Schindler explains here: https://issues.apache.org/jira/browse/TIKA-1757

Thanks, we probably don't need the {{getPath()}} at all but could rather stop right after
{{toURI()}}.

I've grepped through the code and it looks as if we didn't use similar constructs anywhere
else, fortunately.

What really puzzled me is why we were getting an NPE at the point where we use {{ARCDIR}},
by now I think it is {{list}} returning {{null}} because {{ARCDIR}} didn't exist. One of the
many {{File}}-APIs with broken semantics. 

> Allow spaces in path for unit tests in Windows
> ----------------------------------------------
>
>                 Key: COMPRESS-387
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-387
>             Project: Commons Compress
>          Issue Type: Improvement
>            Reporter: Tim Allison
>            Priority: Trivial
>             Fix For: 1.14
>
>
> I'm getting build failures on Windows, probably because I'm working in a directory that
has a space in the name (on purpose!).
> If we modify the much better:
> {noformat}
>     private static final File ARCDIR = new File(CLASSLOADER.getResource("archives").getFile());
> {noformat}
> with this hideousness in LongPathTest, LongSymLinkTest and ArchiveReadTest
> {noformat}
>     static {
>         try {
>             ARCDIR = new File(CLASSLOADER.getResource("archives").toURI().getPath());
>         } catch (URISyntaxException e) {
>             throw new RuntimeException(e);
>         }
>     }
> {noformat}
> tests all pass.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message