Changeset 776 for trunk


Ignore:
Timestamp:
09/06/12 09:45:30 (12 years ago)
Author:
sherbold
Message:
  • should remove FindBugs? warning about regarding a unclosed stream
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/quest-plugin-core/src/main/java/de/ugoe/cs/quest/plugin/PluginLoader.java

    r766 r776  
    126126 
    127127                JarInputStream jarInputStream = null; 
     128                Manifest manifest = null; 
    128129                try { 
    129                         jarInputStream = new JarInputStream(new FileInputStream(jarFile)); 
     130                    FileInputStream fileStream = new FileInputStream(jarFile); 
     131                    try { 
     132                        jarInputStream = new JarInputStream(fileStream); 
     133                        manifest = jarInputStream.getManifest(); 
     134                    } finally { 
     135                        jarInputStream.close(); 
     136                        fileStream.close(); 
     137                    } 
    130138                } catch (FileNotFoundException e) { 
    131139                        throw new AssertionError( 
     
    134142                        throw new PluginLoaderException(e); 
    135143                } 
    136  
    137                 Manifest manifest = jarInputStream.getManifest(); 
    138144 
    139145                String jarClassPath = manifest.getMainAttributes().getValue( 
Note: See TracChangeset for help on using the changeset viewer.