This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git


The following commit(s) were added to refs/heads/master by this push:
     new 404f47f  Format tweaks.
404f47f is described below

commit 404f47f6d4d8c6e6c4dc6b3debe46760a30b282d
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Tue Feb 8 17:53:12 2022 -0500

    Format tweaks.
---
 .../compress/archivers/cpio/CpioArchiveEntry.java   | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

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 5084c75..33e992e 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
@@ -567,8 +567,10 @@ public class CpioArchiveEntry implements CpioConstants, 
ArchiveEntry {
      * @since 1.18
      */
     public int getHeaderPadCount(final long nameSize) {
-        if (this.alignmentBoundary == 0) { return 0; }
-        int size = this.headerSize + 1;  // Name has terminating null
+        if (this.alignmentBoundary == 0) {
+            return 0;
+        }
+        int size = this.headerSize + 1; // Name has terminating null
         if (name != null) {
             size += nameSize;
         }
@@ -584,11 +586,13 @@ public class CpioArchiveEntry implements CpioConstants, 
ArchiveEntry {
      *
      * @return the number of bytes needed to pad the data (0,1,2,3)
      */
-    public int getDataPadCount(){
-        if (this.alignmentBoundary == 0) { return 0; }
+    public int getDataPadCount() {
+        if (this.alignmentBoundary == 0) {
+            return 0;
+        }
         final long size = this.filesize;
         final int remain = (int) (size % this.alignmentBoundary);
-        if (remain > 0){
+        if (remain > 0) {
             return this.alignmentBoundary - remain;
         }
         return 0;
@@ -630,9 +634,7 @@ public class CpioArchiveEntry implements CpioConstants, 
ArchiveEntry {
      * @return Returns the number of links.
      */
     public long getNumberOfLinks() {
-        return nlink == 0 ?
-            isDirectory() ? 2 : 1
-            : nlink;
+        return nlink == 0 ? isDirectory() ? 2 : 1 : nlink;
     }
 
     /**
@@ -826,8 +828,7 @@ public class CpioArchiveEntry implements CpioConstants, 
ArchiveEntry {
      */
     public void setSize(final long size) {
         if (size < 0 || size > 0xFFFFFFFFL) {
-            throw new IllegalArgumentException("Invalid entry size <" + size
-                                               + ">");
+            throw new IllegalArgumentException("Invalid entry size <" + size + 
">");
         }
         this.filesize = size;
     }

Reply via email to