commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject commons-crypto git commit: Add missing braces
Date Sun, 12 Jun 2016 12:56:13 GMT
Repository: commons-crypto
Updated Branches:
  refs/heads/master 0e4d59053 -> 33e98871d


Add missing braces


Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/33e98871
Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/33e98871
Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/33e98871

Branch: refs/heads/master
Commit: 33e98871dbd93670a65187c266762d87d5653825
Parents: 0e4d590
Author: Benedikt Ritter <beneritter@gmail.com>
Authored: Sun Jun 12 14:56:06 2016 +0200
Committer: Benedikt Ritter <beneritter@gmail.com>
Committed: Sun Jun 12 14:56:06 2016 +0200

----------------------------------------------------------------------
 .../org/apache/commons/crypto/stream/CryptoInputStream.java  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/33e98871/src/main/java/org/apache/commons/crypto/stream/CryptoInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/crypto/stream/CryptoInputStream.java b/src/main/java/org/apache/commons/crypto/stream/CryptoInputStream.java
index 0dde10a..86fa891 100644
--- a/src/main/java/org/apache/commons/crypto/stream/CryptoInputStream.java
+++ b/src/main/java/org/apache/commons/crypto/stream/CryptoInputStream.java
@@ -195,8 +195,9 @@ public class CryptoInputStream extends InputStream implements
     @Override
     public int read() throws IOException {
         int n;
-        while ((n = read(oneByteBuf, 0, 1)) == 0)
-            ;
+        while ((n = read(oneByteBuf, 0, 1)) == 0) {
+            /* no op */
+        }
         return (n == -1) ? -1 : oneByteBuf[0] & 0xff;
     }
 
@@ -233,8 +234,9 @@ public class CryptoInputStream extends InputStream implements
         }
         // No data in the out buffer, try read new data and decrypt it
         int nd = decryptMore();
-        if (nd <= 0)
+        if (nd <= 0) {
             return nd;
+        }
 
         int n = Math.min(len, outBuffer.remaining());
         outBuffer.get(b, off, n);


Mime
View raw message