camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrea Cosentino (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-10368) Unused deflater in ZipDataFormat
Date Tue, 04 Oct 2016 11:53:20 GMT

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

Andrea Cosentino commented on CAMEL-10368:
------------------------------------------

Franz, since we are in the process of releasing 2.18.0, please hold on on commit new code.


> Unused deflater in ZipDataFormat
> --------------------------------
>
>                 Key: CAMEL-10368
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10368
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>            Reporter: Franz Forsthofer
>            Assignee: Franz Forsthofer
>             Fix For: 2.18.0, 2.17.4
>
>
> In the ZipDataForamt class you find
>  final Deflater deflater = new Deflater(compressionLevel);
>         final DeflaterOutputStream zipOutput = new DeflaterOutputStream(stream, new Deflater(compressionLevel));
>         try {
>             IOHelper.copy(is, zipOutput);
>         } finally {
>             IOHelper.close(is, zipOutput);
>             
>             /*
>             * As we create the Deflater our self and do not use the stream default
>             * (see {@link java.util.zip.DeflaterOutputStream#usesDefaultDeflater})
>             * we need to close the Deflater to not risk a OutOfMemoryException
>             * in native code parts (see {@link java.util.zip.Deflater#end})
>             */
>             deflater.end();
>         }
> the deflater variable should be used in the DeflaterOutputStream
> final DeflaterOutputStream zipOutput = new DeflaterOutputStream(stream, deflater);



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

Mime
View raw message