Redundant string length calculation

Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/c21193ae
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/c21193ae
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/c21193ae

Branch: refs/heads/master
Commit: c21193ae13a78afff783efb0bab15ba6e7e352bf
Parents: 27a3549
Author: Gintas Grigelionis <[email protected]>
Authored: Fri Aug 3 14:00:59 2018 +0200
Committer: Gintas Grigelionis <[email protected]>
Committed: Fri Aug 3 14:00:59 2018 +0200

----------------------------------------------------------------------
 src/java/org/apache/ivy/osgi/util/ZipUtil.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/c21193ae/src/java/org/apache/ivy/osgi/util/ZipUtil.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/util/ZipUtil.java 
b/src/java/org/apache/ivy/osgi/util/ZipUtil.java
index df03207..a127269 100644
--- a/src/java/org/apache/ivy/osgi/util/ZipUtil.java
+++ b/src/java/org/apache/ivy/osgi/util/ZipUtil.java
@@ -48,8 +48,7 @@ public class ZipUtil {
             }
         } else {
             final String strAbsPath = currDir.getPath();
-            final String strZipEntryName = 
strAbsPath.substring(rootDir.getPath().length() + 1,
-                strAbsPath.length());
+            final String strZipEntryName = 
strAbsPath.substring(rootDir.getPath().length() + 1);
 
             final byte[] b = new byte[(int) (currDir.length())];
             final FileInputStream fis = new FileInputStream(currDir);

Reply via email to