#vulnerable code 
                             public List<Class<?>> getAlgorithmInterfaces(File file) throws IOException, ClassNotFoundException {
		JarFile jar = new JarFile(file);
		
		Manifest man = jar.getManifest();
        Attributes attr = man.getMainAttributes();
        String className = attr.getValue(bootstrapClassTagName);
        
        URL[] url = {file.toURI().toURL()};
        ClassLoader loader = new URLClassLoader(url, Algorithm.class.getClassLoader());
        
        Class<?> algorithmClass = Class.forName(className, false, loader);
        
		return Arrays.asList(algorithmClass.getInterfaces());
	} 
                            #location 4 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                             public List<Class<?>> getAlgorithmInterfaces(File file) throws IOException, ClassNotFoundException {
		JarFile jar = new JarFile(file);
		
		Manifest man = jar.getManifest();
        Attributes attr = man.getMainAttributes();
        String className = attr.getValue(bootstrapClassTagName);
        
        URL[] url = {file.toURI().toURL()};
        ClassLoader loader = new URLClassLoader(url, Algorithm.class.getClassLoader());
        
        Class<?> algorithmClass = Class.forName(className, false, loader);
        
        jar.close();
        
		return Arrays.asList(algorithmClass.getInterfaces());
	}