@Test void testGetResource() { PrefixJarResource resource = new PrefixJarResource(); assertThrows(NullPointerException.class, () -> assertNull(resource.getResource(null))); }
@Override public URL getResource(String location) { URL result = null; try { location = prefix + location; JarEntry jarEntry = jarFile.getJarEntry(location); if (jarEntry != null) { result = new URL("jar: } } catch (MalformedURLException use) { } return result; }
PrefixJarResource implements Resource { @Override public URL getResource(String location) { URL result = null; try { location = prefix + location; JarEntry jarEntry = jarFile.getJarEntry(location); if (jarEntry != null) { result = new URL("jar: } } catch (MalformedURLException use) { } return result; } }
PrefixJarResource implements Resource { @Override public URL getResource(String location) { URL result = null; try { location = prefix + location; JarEntry jarEntry = jarFile.getJarEntry(location); if (jarEntry != null) { result = new URL("jar: } } catch (MalformedURLException use) { } return result; } PrefixJarResource();  PrefixJarResource(JarFile jarFile, String prefix); }
PrefixJarResource implements Resource { @Override public URL getResource(String location) { URL result = null; try { location = prefix + location; JarEntry jarEntry = jarFile.getJarEntry(location); if (jarEntry != null) { result = new URL("jar: } } catch (MalformedURLException use) { } return result; } PrefixJarResource();  PrefixJarResource(JarFile jarFile, String prefix); @Override URL getResource(String location); @Override InputStream getResourceAsStream(String location); Stream<String> getAllLocations(); JarFile getJarFile(); String getPrefix(); void setJarFile(JarFile jarFile); void setPrefix(String prefix); }
PrefixJarResource implements Resource { @Override public URL getResource(String location) { URL result = null; try { location = prefix + location; JarEntry jarEntry = jarFile.getJarEntry(location); if (jarEntry != null) { result = new URL("jar: } } catch (MalformedURLException use) { } return result; } PrefixJarResource();  PrefixJarResource(JarFile jarFile, String prefix); @Override URL getResource(String location); @Override InputStream getResourceAsStream(String location); Stream<String> getAllLocations(); JarFile getJarFile(); String getPrefix(); void setJarFile(JarFile jarFile); void setPrefix(String prefix);  }