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-328) TarArchiveEntry preserveLeadingSlashes has no effect on setName
Date Thu, 07 Jan 2016 19:44:39 GMT

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

Stefan Bodewig commented on COMPRESS-328:
-----------------------------------------

Would you use {{setName}} after invoking a constructor with a {{name}} argument? If one only
does so for the side effect of {{preserveLeadingSlashes}} then maybe [~ebourg]'s additional
overload for {{setName}} would be a better idea.

I'm not really opposed to making use of {{preserveLeadingSlashes}}, I just don't understand
how the situation arises :-)

> TarArchiveEntry preserveLeadingSlashes has no effect on setName
> ---------------------------------------------------------------
>
>                 Key: COMPRESS-328
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-328
>             Project: Commons Compress
>          Issue Type: Improvement
>            Reporter: Torsten Curdt
>            Priority: Minor
>
> We've run into an inconsistency with the TarArchiveEntry at jdeb.
>   https://github.com/tcurdt/jdeb/issues/217
> You can create a `TarArchiveEntry(String name, boolean preserveLeadingSlashes)` but the
`preserveLeadingSlashes` is only applied in the constructor.
> https://github.com/apache/commons-compress/blob/master/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java#L392
> I am proposing to turn `preserveLeadingSlashes` into a read-only property and use the
value on `setName()`, too (instead of just false).
> This has some implications and maybe some backwards compatibility issues - but even then
I think it would be the right thing to do.
> I am happy to make the change but thought to discuss this first.



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

Mime
View raw message