MCPcopy Create free account
hub / github.com/BaseXdb/basex / manifest

Method manifest

basex-core/src/main/java/org/basex/util/Prop.java:218–235  ·  view source on GitHub ↗

Returns the attributes from the MANIFEST.MF file. @return attributes, or empty attribute list if the file is not found or cannot be parsed

()

Source from the content-addressed store, hash-verified

216 * @return attributes, or empty attribute list if the file is not found or cannot be parsed
217 */
218 private static Attributes manifest() {
219 if(LOCATION != null) {
220 try {
221 final String jar = LOCATION.getFile();
222 final ClassLoader cl = Prop.class.getClassLoader();
223 for(final URL url : Collections.list(cl.getResources("META-INF/MANIFEST.MF"))) {
224 if(url.getFile().contains(jar)) {
225 try(InputStream in = url.openStream()) {
226 return new Manifest(in).getMainAttributes();
227 }
228 }
229 }
230 } catch(final IOException ex) {
231 Util.stack(ex);
232 }
233 }
234 return new Attributes(0);
235 }
236}

Callers 1

PropClass · 0.95

Calls 3

stackMethod · 0.95
containsMethod · 0.65
listMethod · 0.45

Tested by

no test coverage detected