Drop trailing spaces where file has at least one instance of multiple trailing spaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/compress/trunk@1437047 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
index 1c39d95..03aa12b 100644
--- a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
@@ -272,7 +272,7 @@
System.arraycopy(longNameData, 0, l, 0, length);
longNameData = l;
}
-
+
currEntry.setName(encoding.decode(longNameData));
}
@@ -415,10 +415,10 @@
/**
* Adds the sparse chunks from the current entry to the sparse chunks,
* including any additional sparse entries following the current entry.
- *
- * @throws IOException on error
- *
- * @todo Sparse files get not yet really processed.
+ *
+ * @throws IOException on error
+ *
+ * @todo Sparse files get not yet really processed.
*/
private void readGNUSparse() throws IOException {
/* we do not really process sparse files yet
@@ -559,7 +559,7 @@
/**
* Checks if the signature matches what is expected for a tar file.
- *
+ *
* @param signature
* the bytes to check
* @param length
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
index b30812f..5ab0931 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
@@ -226,7 +226,7 @@
} catch (EOFException e) {
return null;
}
-
+
ZipLong sig = new ZipLong(LFH_BUF);
if (sig.equals(ZipLong.CFH_SIG) || sig.equals(ZipLong.AED_SIG)) {
hitCentralDirectory = true;
@@ -308,7 +308,7 @@
readFully(lfh);
ZipLong sig = new ZipLong(lfh);
if (sig.equals(ZipLong.DD_SIG)) {
- throw new
+ throw new
UnsupportedZipFeatureException(UnsupportedZipFeatureException
.Feature.SPLITTING);
}
@@ -533,7 +533,7 @@
* Checks if the signature matches what is expected for a zip file.
* Does not currently handle self-extracting zips which may have arbitrary
* leading content.
- *
+ *
* @param signature
* the bytes to check
* @param length
@@ -594,7 +594,7 @@
} else {
skip(Long.MAX_VALUE);
- long inB =
+ long inB =
current.entry.getMethod() == ZipArchiveOutputStream.DEFLATED
? getBytesInflated() : current.bytesRead;
diff --git a/src/main/java/org/apache/commons/compress/utils/Charsets.java b/src/main/java/org/apache/commons/compress/utils/Charsets.java
index ef018f8..8970f39 100644
--- a/src/main/java/org/apache/commons/compress/utils/Charsets.java
+++ b/src/main/java/org/apache/commons/compress/utils/Charsets.java
@@ -13,7 +13,7 @@
* 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.
- *
+ *
*/
package org.apache.commons.compress.utils;
@@ -22,7 +22,7 @@
/**
* Charsets required of every implementation of the Java platform.
- *
+ *
* From the Java documentation <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard
* charsets</a>:
* <p>
@@ -30,7 +30,7 @@
* release documentation for your implementation to see if any other encodings are supported. Consult the release
* documentation for your implementation to see if any other encodings are supported. </cite>
* </p>
- *
+ *
* <ul>
* <li><code>US-ASCII</code><br/>
* Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set.</li>
@@ -46,24 +46,24 @@
* Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark (either order
* accepted on input, big-endian used on output.)</li>
* </ul>
- *
+ *
* This class best belongs in the Commons Lang or IO project. Even if a similar class is defined in another Commons component, it is
* not foreseen that Commons Compress would be made to depend on another Commons component.
- *
+ *
* @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
* @since 1.4
* @version $Id$
*/
public class Charsets {
-
+
//
// This class should only contain Charset instances for required encodings. This guarantees that it will load correctly and
// without delay on all Java platforms.
//
-
+
/**
- * Returns the given Charset or the default Charset if the given Charset is null.
- *
+ * Returns the given Charset or the default Charset if the given Charset is null.
+ *
* @param charset
* A charset or null.
* @return the given Charset or the default Charset if the given Charset is null
@@ -74,7 +74,7 @@
/**
* Returns a Charset for the named charset. If the name is null, return the default Charset.
- *
+ *
* @param charset
* The name of the requested charset, may be null.
* @return a Charset for the named charset
@@ -92,7 +92,7 @@
* <p>
* Every implementation of the Java platform is required to support this character encoding.
* </p>
- *
+ *
* @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
*/
public static final Charset ISO_8859_1 = Charset.forName(CharsetNames.ISO_8859_1);
@@ -104,7 +104,7 @@
* <p>
* Every implementation of the Java platform is required to support this character encoding.
* </p>
- *
+ *
* @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
*/
public static final Charset US_ASCII = Charset.forName(CharsetNames.US_ASCII);
@@ -117,7 +117,7 @@
* <p>
* Every implementation of the Java platform is required to support this character encoding.
* </p>
- *
+ *
* @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
*/
public static final Charset UTF_16 = Charset.forName(CharsetNames.UTF_16);
@@ -129,7 +129,7 @@
* <p>
* Every implementation of the Java platform is required to support this character encoding.
* </p>
- *
+ *
* @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
*/
public static final Charset UTF_16BE = Charset.forName(CharsetNames.UTF_16BE);
@@ -141,7 +141,7 @@
* <p>
* Every implementation of the Java platform is required to support this character encoding.
* </p>
- *
+ *
* @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
*/
public static final Charset UTF_16LE = Charset.forName(CharsetNames.UTF_16LE);
@@ -153,7 +153,7 @@
* <p>
* Every implementation of the Java platform is required to support this character encoding.
* </p>
- *
+ *
* @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
*/
public static final Charset UTF_8 = Charset.forName(CharsetNames.UTF_8);
diff --git a/src/test/java/org/apache/commons/compress/AbstractTestCase.java b/src/test/java/org/apache/commons/compress/AbstractTestCase.java
index 33e6dd7..8d20bc7 100644
--- a/src/test/java/org/apache/commons/compress/AbstractTestCase.java
+++ b/src/test/java/org/apache/commons/compress/AbstractTestCase.java
@@ -137,7 +137,7 @@
* Creates an archive of textbased files in several directories. The
* archivername is the factory identifier for the archiver, for example zip,
* tar, cpio, jar, ar. The archive is created as a temp file.
- *
+ *
* The archive contains the following files:
* <ul>
* <li>testdata/test1.xml</li>
@@ -150,7 +150,7 @@
* <li>something/bla</li>
* <li>test with spaces.txt</li>
* </ul>
- *
+ *
* @param archivename
* the identifier of this archive
* @return the newly created file
@@ -198,7 +198,7 @@
/**
* Add an entry to the archive, and keep track of the names in archiveList.
- *
+ *
* @param out
* @param file1
* @throws IOException
@@ -241,7 +241,7 @@
/**
* Create an archive with a single file "test1.xml".
- *
+ *
* @param archivename
* @return the archive File
* @throws Exception
@@ -270,7 +270,7 @@
/**
* Checks if an archive contains all expected files.
- *
+ *
* @param archive
* the archive to check
* @param expected
@@ -291,7 +291,7 @@
/**
* Checks that an archive input stream can be read, and that the file data matches file sizes.
- *
+ *
* @param in
* @param expected list of expected entries or {@code null} if no check of names desired
* @throws Exception
@@ -303,11 +303,11 @@
/**
* Checks that an archive input stream can be read, and that the file data matches file sizes.
- *
+ *
* @param in
* @param expected list of expected entries or {@code null} if no check of names desired
- * @param cleanUp Cleans up resources if true
- * @return returns the created result file if cleanUp = false, or null otherwise
+ * @param cleanUp Cleans up resources if true
+ * @return returns the created result file if cleanUp = false, or null otherwise
* @throws Exception
*/
protected File checkArchiveContent(ArchiveInputStream in, List<String> expected, boolean cleanUp)
@@ -364,7 +364,7 @@
/**
* Override this method to change what is to be compared in the List.
* For example, size + name instead of just name.
- *
+ *
* @param entry
* @return returns the entry name
*/
@@ -390,7 +390,7 @@
fos.close();
}
}
-
+
protected void closeQuietly(Closeable closeable){
if (closeable != null) {
try {