git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1350883 13f79535-47bb-0310-9956-ffa450edef68master
@@ -55,6 +55,9 @@ Other changes: | |||||
* merged the BZIP2 package from Commons Compress, it can now | * merged the BZIP2 package from Commons Compress, it can now | ||||
optionally read files that contain multiple streams properly. | optionally read files that contain multiple streams properly. | ||||
* <bunzip2> will now properly expand files created by pbzip2 and | |||||
similar tools that create files with multiple bzip2 streams. | |||||
Changes from Ant 1.8.3 TO Ant 1.8.4 | Changes from Ant 1.8.3 TO Ant 1.8.4 | ||||
=================================== | =================================== | ||||
@@ -75,7 +75,7 @@ public class BUnzip2 extends Unpack { | |||||
if (b != 'Z') { | if (b != 'Z') { | ||||
throw new BuildException("Invalid bz2 file.", getLocation()); | throw new BuildException("Invalid bz2 file.", getLocation()); | ||||
} | } | ||||
zIn = new CBZip2InputStream(bis); | |||||
zIn = new CBZip2InputStream(bis, true); | |||||
byte[] buffer = new byte[BUFFER_SIZE]; | byte[] buffer = new byte[BUFFER_SIZE]; | ||||
int count = 0; | int count = 0; | ||||
do { | do { | ||||
@@ -0,0 +1,28 @@ | |||||
<?xml version="1.0"?> | |||||
<!-- | |||||
Licensed to the Apache Software Foundation (ASF) under one or more | |||||
contributor license agreements. See the NOTICE file distributed with | |||||
this work for additional information regarding copyright ownership. | |||||
The ASF licenses this file to You under the Apache License, Version 2.0 | |||||
(the "License"); you may not use this file except in compliance with | |||||
the License. You may obtain a copy of the License at | |||||
http://www.apache.org/licenses/LICENSE-2.0 | |||||
Unless required by applicable law or agreed to in writing, software | |||||
distributed under the License is distributed on an "AS IS" BASIS, | |||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||||
See the License for the specific language governing permissions and | |||||
limitations under the License. | |||||
--> | |||||
<project default="antunit" xmlns:au="antlib:org.apache.ant.antunit"> | |||||
<import file="../antunit-base.xml" /> | |||||
<target name="testExpandArchiveWithMultipleStreams"> | |||||
<mkdir dir="${output}"/> | |||||
<bunzip2 src="bzip2/multiple.bz2" dest="${output}"/> | |||||
<au:assertFilesMatch expected="bzip2/expected" | |||||
actual="${output}/multiple"/> | |||||
</target> | |||||
</project> |
@@ -0,0 +1 @@ | |||||
ab |