[jira] [Commented] (COMPRESS-441) Remove dummyByte workaround from BoundedInputStream and use SequentialInputStream instead

2018-01-14 Thread Dawid Weiss (JIRA)

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

Dawid Weiss commented on COMPRESS-441:
--

I provided a PR for this... forgot to link it to the issue?
https://github.com/apache/commons-compress/pull/60


> Remove dummyByte workaround from BoundedInputStream and use 
> SequentialInputStream instead
> -
>
> Key: COMPRESS-441
> URL: https://issues.apache.org/jira/browse/COMPRESS-441
> Project: Commons Compress
>  Issue Type: Improvement
>Reporter: Dawid Weiss
>Priority: Trivial
> Fix For: 1.16
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (COMPRESS-441) Remove dummyByte workaround from BoundedInputStream and use SequentialInputStream instead

2018-01-14 Thread Stefan Bodewig (JIRA)

 [ 
https://issues.apache.org/jira/browse/COMPRESS-441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Bodewig resolved COMPRESS-441.
-
   Resolution: Fixed
Fix Version/s: 1.16

> Remove dummyByte workaround from BoundedInputStream and use 
> SequentialInputStream instead
> -
>
> Key: COMPRESS-441
> URL: https://issues.apache.org/jira/browse/COMPRESS-441
> Project: Commons Compress
>  Issue Type: Improvement
>Reporter: Dawid Weiss
>Priority: Trivial
> Fix For: 1.16
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (COMPRESS-436) ZipArchiveInputStream#getNextZipEntry should verify compressed size is known for bzip2, implode etc.

2018-01-14 Thread Stefan Bodewig (JIRA)

 [ 
https://issues.apache.org/jira/browse/COMPRESS-436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Bodewig resolved COMPRESS-436.
-
Resolution: Fixed

> ZipArchiveInputStream#getNextZipEntry should verify compressed size is known 
> for bzip2, implode etc.
> 
>
> Key: COMPRESS-436
> URL: https://issues.apache.org/jira/browse/COMPRESS-436
> Project: Commons Compress
>  Issue Type: Bug
>  Components: Archivers
>Affects Versions: 1.15
>Reporter: Stefan Bodewig
>  Labels: zip
> Fix For: 1.16
>
>
> {code}
> if (current.entry.getCompressedSize() != ArchiveEntry.SIZE_UNKNOWN) {
> if (current.entry.getMethod() == ZipMethod.UNSHRINKING.getCode()) 
> {
> current.in = new UnshrinkingInputStream(new 
> BoundedInputStream(in, current.entry.getCompressedSize()));
> } else if (current.entry.getMethod() == 
> ZipMethod.IMPLODING.getCode()) {
> current.in = new ExplodingInputStream(
> 
> current.entry.getGeneralPurposeBit().getSlidingDictionarySize(),
> 
> current.entry.getGeneralPurposeBit().getNumberOfShannonFanoTrees(),
> new BoundedInputStream(in, 
> current.entry.getCompressedSize()));
> } else if (current.entry.getMethod() == 
> ZipMethod.BZIP2.getCode()) {
> current.in = new BZip2CompressorInputStream(new 
> BoundedInputStream(in, current.entry.getCompressedSize()));
> }
> }
> {code}
> never sets {{current.in}} if the compressed size is unknown which probably 
> leads to a NullPointerException in {{read}} later. We should fail early with 
> a useful error message instead.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (IO-557) UnsupportedEncodingException when opening an ISO-8859-1 XML stream with Turkish as the default locale

2018-01-14 Thread Pascal Schumacher (JIRA)

 [ 
https://issues.apache.org/jira/browse/IO-557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pascal Schumacher resolved IO-557.
--
   Resolution: Fixed
 Assignee: Pascal Schumacher
Fix Version/s: 2.7

> UnsupportedEncodingException when opening an ISO-8859-1 XML stream with 
> Turkish as the default locale
> -
>
> Key: IO-557
> URL: https://issues.apache.org/jira/browse/IO-557
> Project: Commons IO
>  Issue Type: Bug
>  Components: Streams/Writers
>Affects Versions: 2.6
> Environment: JVM running with argument -Duser.language=tr, or on an 
> Operating System with Turkish as its preferred language.
>Reporter: luccioman
>Assignee: Pascal Schumacher
>Priority: Minor
>  Labels: easyfix
> Fix For: 2.7
>
>
> When the default locale is set to the Turkish language, using the 
> XmlStreamReader constructor on an XML stream with a prolog including the 
> ISO-8859-1 charset name in lowercase as its encoding throws a 
> UnsupportedEncodingException (java.io.UnsupportedEncodingException: 
> İSO-8859-1).
> Example XML prolog : 
> This is apparently because the XmlStreamReader class uses 
> String.toUpperCase() in its getXmlProlog() function. It should rather use 
> toUpperCase(Locale.ROOT) or toUpperCase(Locale.US) as already done in the 
> getContentTypeEncoding() function. Otherwise the behaviour can be different 
> depending on the default locale, as the dotted lower case i becomes a dotted 
> upper case i in the Turkish language, which not the case with other languages.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (IO-557) UnsupportedEncodingException when opening an ISO-8859-1 XML stream with Turkish as the default locale

2018-01-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/IO-557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16325499#comment-16325499
 ] 

ASF GitHub Bot commented on IO-557:
---

Github user asfgit closed the pull request at:

https://github.com/apache/commons-io/pull/51


> UnsupportedEncodingException when opening an ISO-8859-1 XML stream with 
> Turkish as the default locale
> -
>
> Key: IO-557
> URL: https://issues.apache.org/jira/browse/IO-557
> Project: Commons IO
>  Issue Type: Bug
>  Components: Streams/Writers
>Affects Versions: 2.6
> Environment: JVM running with argument -Duser.language=tr, or on an 
> Operating System with Turkish as its preferred language.
>Reporter: luccioman
>Priority: Minor
>  Labels: easyfix
>
> When the default locale is set to the Turkish language, using the 
> XmlStreamReader constructor on an XML stream with a prolog including the 
> ISO-8859-1 charset name in lowercase as its encoding throws a 
> UnsupportedEncodingException (java.io.UnsupportedEncodingException: 
> İSO-8859-1).
> Example XML prolog : 
> This is apparently because the XmlStreamReader class uses 
> String.toUpperCase() in its getXmlProlog() function. It should rather use 
> toUpperCase(Locale.ROOT) or toUpperCase(Locale.US) as already done in the 
> getContentTypeEncoding() function. Otherwise the behaviour can be different 
> depending on the default locale, as the dotted lower case i becomes a dotted 
> upper case i in the Turkish language, which not the case with other languages.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)