src/share/classes/org/openjdk/jigsaw/RemoteRepository.java

Print this page

        

*** 331,340 **** --- 331,363 ---- throws IOException { catalog().gatherModuleIds(moduleName, mids); } + /** + * Find all module views and aliases with the given name and module + * architecture in this catalog. + */ + public List<ModuleId> findlocalModuleIds(String moduleName, + ModuleArchitecture modArch) + throws IOException + { + Set<ModuleId> mids = new HashSet<>(); + gatherLocalModuleIds(moduleName, modArch, mids); + List<ModuleId> rv = new ArrayList<>(mids); + Collections.sort(rv); + return rv; + } + + protected void gatherLocalModuleIds(String moduleName, + ModuleArchitecture modArch, + Set<ModuleId> mids) + throws IOException + { + catalog().gatherModuleIds(moduleName, modArch, mids); + } + @Override protected void gatherLocalDeclaringModuleIds(Set<ModuleId> mids) throws IOException { catalog().gatherDeclaringModuleIds(mids);
*** 348,359 **** return jms.parseModuleInfo(bs); } @Override public InputStream fetch(ModuleId mid) throws IOException { ! ModuleMetaData mmd = fetchMetaData(mid); ! URI u = uri.resolve(mid.toString() + mmd.getType().getFileNameSuffix()); if (tracing) trace(1, "fetching module %s", u); // special case file protocol for faster access if (u.getScheme().equalsIgnoreCase("file")) { --- 371,382 ---- return jms.parseModuleInfo(bs); } @Override public InputStream fetch(ModuleId mid) throws IOException { ! ModuleFileMetaData mfmd = fetchMetaData(mid); ! URI u = uri.resolve(mid.toString() + mfmd.getType().getFileNameSuffix()); if (tracing) trace(1, "fetching module %s", u); // special case file protocol for faster access if (u.getScheme().equalsIgnoreCase("file")) {
*** 373,387 **** return uc.getInputStream(); } } @Override ! public ModuleMetaData fetchMetaData(ModuleId mid) throws IOException { RepositoryCatalog.Entry e = catalog().get(mid); if (e == null) throw new IllegalArgumentException(mid.toString()); ! return new ModuleMetaData(e.type, e.csize, e.usize); } /** * Attempts to delete {@code f}. If the delete fails then the exception is --- 396,410 ---- return uc.getInputStream(); } } @Override ! public ModuleFileMetaData fetchMetaData(ModuleId mid) throws IOException { RepositoryCatalog.Entry e = catalog().get(mid); if (e == null) throw new IllegalArgumentException(mid.toString()); ! return new ModuleFileMetaData(e.type, e.modArch, e.csize, e.usize); } /** * Attempts to delete {@code f}. If the delete fails then the exception is