You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:24:24 UTC

[sling-org-apache-sling-commons-osgi] 20/29: Clean up code.

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

rombert pushed a commit to annotated tag org.apache.sling.commons.osgi-2.0.6
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-osgi.git

commit 55158d5e9ac6eafb9f661d3fe50aeee0af641d69
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Jan 19 19:44:59 2010 +0000

    Clean up code.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/osgi@900930 13f79535-47bb-0310-9956-ffa450edef68
---
 .../commons/osgi/bundleversion/FileBundleVersionInfo.java    | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/main/java/org/apache/sling/commons/osgi/bundleversion/FileBundleVersionInfo.java b/src/main/java/org/apache/sling/commons/osgi/bundleversion/FileBundleVersionInfo.java
index 9a9a68f..119ae7c 100644
--- a/src/main/java/org/apache/sling/commons/osgi/bundleversion/FileBundleVersionInfo.java
+++ b/src/main/java/org/apache/sling/commons/osgi/bundleversion/FileBundleVersionInfo.java
@@ -34,7 +34,7 @@ public class FileBundleVersionInfo extends BundleVersionInfo<File> {
     private final boolean isSnapshot;
     private final long lastModified;
     private final File source;
-    
+
     public FileBundleVersionInfo(File bundle) throws IOException {
         source = bundle;
         final JarFile f = new JarFile(bundle);
@@ -61,21 +61,19 @@ public class FileBundleVersionInfo extends BundleVersionInfo<File> {
                 lastModified = lastMod;
             }
         } finally {
-            if(f != null) {
-                f.close();
-            }
+            f.close();
         }
     }
-    
+
     @Override
     public String toString() {
         return getClass().getSimpleName() + " " + source.getAbsolutePath();
     }
-    
+
     public boolean isBundle() {
         return symbolicName != null;
     }
-    
+
     public long getBundleLastModified() {
         return lastModified;
     }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.