You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2010/01/19 20:44:59 UTC

svn commit: r900930 - /sling/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi/bundleversion/FileBundleVersionInfo.java

Author: cziegeler
Date: Tue Jan 19 19:44:59 2010
New Revision: 900930

URL: http://svn.apache.org/viewvc?rev=900930&view=rev
Log:
Clean up code.

Modified:
    sling/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi/bundleversion/FileBundleVersionInfo.java

Modified: sling/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi/bundleversion/FileBundleVersionInfo.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi/bundleversion/FileBundleVersionInfo.java?rev=900930&r1=900929&r2=900930&view=diff
==============================================================================
--- sling/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi/bundleversion/FileBundleVersionInfo.java (original)
+++ sling/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi/bundleversion/FileBundleVersionInfo.java Tue Jan 19 19:44:59 2010
@@ -34,7 +34,7 @@
     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 @@
                 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;
     }