commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject [3/6] commons-compress git commit: whitespace
Date Wed, 11 Jul 2018 16:52:52 GMT
whitespace


Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/17575b88
Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/17575b88
Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/17575b88

Branch: refs/heads/master
Commit: 17575b8836ba18201ac7b839aeb432421b0c89bf
Parents: 1fbb16b
Author: Stefan Bodewig <bodewig@apache.org>
Authored: Wed Jul 11 18:09:42 2018 +0200
Committer: Stefan Bodewig <bodewig@apache.org>
Committed: Wed Jul 11 18:09:42 2018 +0200

----------------------------------------------------------------------
 .../compress/archivers/cpio/CpioArchiveEntry.java     | 14 +++++++-------
 .../archivers/cpio/CpioArchiveInputStream.java        |  4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/17575b88/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java
b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java
index 0266da1..79e7542 100644
--- a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java
@@ -481,15 +481,15 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry
{
      * Get the number of bytes needed to pad the header to the alignment boundary.
      *
      * @param charset
-     *             The character set used to encode the entry name in the stream. 
+     *             The character set used to encode the entry name in the stream.
      * @return the number of bytes needed to pad the header (0,1,2,3)
      * @since 1.18
      */
-    public int getHeaderPadCount(Charset charset){
-        if (name==null) {
+    public int getHeaderPadCount(Charset charset) {
+        if (name == null) {
             return 0;
         }
-        if (charset==null) {
+        if (charset == null) {
             return getHeaderPadCount(name.length());
         }
         return getHeaderPadCount(name.getBytes(charset).length);
@@ -502,17 +502,17 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry
{
      *            The length of the name in bytes, as read in the stream.
      *            Without the trailing zero byte.
      * @return the number of bytes needed to pad the header (0,1,2,3)
-     * 
+     *
      * @since 1.18
      */
-    public int getHeaderPadCount(long namesize){
+    public int getHeaderPadCount(long namesize) {
         if (this.alignmentBoundary == 0) { return 0; }
         int size = this.headerSize + 1;  // Name has terminating null
         if (name != null) {
             size += namesize;
         }
         final int remain = size % this.alignmentBoundary;
-        if (remain > 0){
+        if (remain > 0) {
             return this.alignmentBoundary - remain;
         }
         return 0;

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/17575b88/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
index b64d091..bdfc802 100644
--- a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
@@ -393,7 +393,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements
                                   + ArchiveUtils.sanitize(name)
                                   + " Occured at byte: " + getBytesRead());
         }
-        skip(ret.getHeaderPadCount(namesize-1));
+        skip(ret.getHeaderPadCount(namesize - 1));
 
         return ret;
     }
@@ -449,7 +449,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements
                                   + ArchiveUtils.sanitize(name)
                                   + "Occured at byte: " + getBytesRead());
         }
-        skip(ret.getHeaderPadCount(namesize-1));
+        skip(ret.getHeaderPadCount(namesize - 1));
 
         return ret;
     }


Mime
View raw message