commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject commons-compress git commit: Formatting.
Date Fri, 09 Dec 2016 19:34:02 GMT
Repository: commons-compress
Updated Branches:
  refs/heads/master eda3a0201 -> 7b7f490c4


Formatting.

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

Branch: refs/heads/master
Commit: 7b7f490c4597c77cce72a95a4447c5bc971bf49d
Parents: eda3a02
Author: ggregory <ggregory@US-L-GG02.rocketsoftware.com>
Authored: Fri Dec 9 11:34:00 2016 -0800
Committer: ggregory <ggregory@US-L-GG02.rocketsoftware.com>
Committed: Fri Dec 9 11:34:00 2016 -0800

----------------------------------------------------------------------
 .../compress/archivers/ar/ArArchiveInputStream.java    | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/7b7f490c/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
index 25b6a9d..0489ad4 100644
--- a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
@@ -172,20 +172,21 @@ public class ArArchiveInputStream extends ArchiveInputStream {
      * @return the extended file name; without trailing "/" if present.
      * @throws IOException if name not found or buffer not set up
      */
-    private String getExtendedName(final int offset) throws IOException{
+    private String getExtendedName(final int offset) throws IOException {
         if (namebuffer == null) {
             throw new IOException("Cannot process GNU long filename as no // record was found");
         }
-        for(int i=offset; i < namebuffer.length; i++){
-            if (namebuffer[i] == '\012' || namebuffer[i] == 0){
-                if (namebuffer[i-1]=='/') {
+        for (int i = offset; i < namebuffer.length; i++) {
+            if (namebuffer[i] == '\012' || namebuffer[i] == 0) {
+                if (namebuffer[i - 1] == '/') {
                     i--; // drop trailing /
                 }
-                return ArchiveUtils.toAsciiString(namebuffer, offset, i-offset);
+                return ArchiveUtils.toAsciiString(namebuffer, offset, i - offset);
             }
         }
-        throw new IOException("Failed to read entry: "+offset);
+        throw new IOException("Failed to read entry: " + offset);
     }
+
     private long asLong(final byte[] byteArray) {
         return Long.parseLong(ArchiveUtils.toAsciiString(byteArray).trim());
     }


Mime
View raw message