incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r900930 - /sling/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi/bundleversion/FileBundleVersionInfo.java
Date Tue, 19 Jan 2010 19:44:59 GMT
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;
     }



Mime
View raw message