private Module loadFromResolver(File file, ZipFile zipFile, ZipEntry moduleDescriptor,
DependencyResolver dependencyResolver, String name, String version,
Type moduleType) throws IOException {
InputStream inputStream = zipFile.getInputStream(moduleDescriptor);
try{
ModuleInfo moduleDependencies = dependencyResolver.resolveFromInputStream(inputStream);
Module module = new Module(name, version, moduleType, file);
for(ModuleDependencyInfo dep : moduleDependencies.getDependencies()){
module.addDependency(dep.getName(), dep.getVersion(), dep.isOptional(), dep.isExport());
}
return module;
}finally{
inputStream.close();