commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Rosenvold <kristian.rosenv...@gmail.com>
Subject Re: svn commit: r1650632 - in /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip: ZipArchiveEntry.java ZipArchiveOutputStream.java
Date Mon, 12 Jan 2015 17:07:48 GMT
I see you fixed this. Thanks.


Kristian


2015-01-11 19:58 GMT+01:00 Stefan Bodewig <bodewig@apache.org>:
> On 2015-01-09, <krosenvold@apache.org> wrote:
>
>> @@ -336,20 +338,48 @@ public class ZipArchiveEntry extends jav
>>       * @since 1.1
>>       */
>>      public ZipExtraField[] getExtraFields(boolean includeUnparseable) {
>>+        return includeUnparseable ?
>>+                getAllExtraFields() :
>>+                getParseableExtraFields();
>>+    }
>
> This is inconsistent WRT copying arrays or returning the internal
> structure.  getAllExtraFields will create a copy of extraFields (unless
> there has been unparseable data), but getParseableExtraFields() does
> not.
>
> I think it would be good to always create copies here, maybe call the
> no-arg version of getExtraFields instead of getParseableExtraFields?
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message