/** * Make sure we have a manifest * * @throws Exception */ public void ensureManifest() throws Exception { if (getManifest() != null) return; manifest = new Manifest(); }
/** * Make sure we have a manifest * * @throws Exception */ public void ensureManifest() throws Exception { if (getManifest() != null) return; manifest = new Manifest(); }
/** * Make sure we have a manifest * * @throws Exception */ public void ensureManifest() throws Exception { if (getManifest() != null) return; manifest = new Manifest(); }
/** * Make sure we have a manifest * * @throws Exception */ public void ensureManifest() throws Exception { if (getManifest() != null) return; manifest = new Manifest(); }
private boolean isOsgi( Jar jar ) throws Exception { if ( jar.getManifest() != null ) { return jar.getManifest().getMainAttributes().getValue( Analyzer.BUNDLE_NAME ) != null; } return false; }
/** * Make sure we have a manifest * * @throws Exception */ public void ensureManifest() throws Exception { if (getManifest() != null) return; manifest = new Manifest(); }
public String getVersion() throws Exception { check(); Manifest m = getManifest(); if (m == null) return null; String s = m.getMainAttributes().getValue(Constants.BUNDLE_VERSION); if (s == null) return null; return s.trim(); }
private Parameters getExports(Jar jar) throws Exception { Manifest m = jar.getManifest(); if (m == null) return new Parameters(); return OSGiHeader.parseHeader(m.getMainAttributes().getValue(Constants.EXPORT_PACKAGE)); }
private Parameters getExports(Jar jar) throws Exception { Manifest m = jar.getManifest(); if (m == null) return new Parameters(); return OSGiHeader.parseHeader(m.getMainAttributes() .getValue(Constants.EXPORT_PACKAGE)); }
private Parameters getExports(Jar jar) throws Exception { Manifest m = jar.getManifest(); if (m == null) return new Parameters(); return OSGiHeader.parseHeader(m.getMainAttributes().getValue(Constants.EXPORT_PACKAGE)); }
private Parameters getExports(Jar jar) throws Exception { Manifest m = jar.getManifest(); if (m == null) return new Parameters(); return OSGiHeader.parseHeader(m.getMainAttributes().getValue(Constants.EXPORT_PACKAGE)); }
public Analyzer(Jar jar) throws Exception { super(); this.dot = Objects.requireNonNull(jar); Manifest manifest = dot.getManifest(); if (manifest != null) copyFrom(Domain.domain(manifest)); }
public Verifier(Analyzer analyzer) throws Exception { super(analyzer); this.analyzer = analyzer; this.dot = analyzer.getJar(); this.manifest = dot.getManifest(); this.main = Domain.domain(manifest); }
/** * Cleanup the manifest for writing. Cleaning up consists of adding a space * after any \n to prevent the manifest to see this newline as a delimiter. * * @param out * Output * @throws IOException */ public void writeManifest(OutputStream out) throws Exception { check(); writeManifest(getManifest(), out); }
public Verifier(Analyzer analyzer) throws Exception { this.analyzer = analyzer; this.dot = analyzer.getJar(); this.manifest = dot.getManifest(); this.main = Domain.domain(manifest); }
public Verifier(Analyzer analyzer) throws Exception { super(analyzer); this.analyzer = analyzer; this.dot = analyzer.getJar(); this.manifest = dot.getManifest(); this.main = Domain.domain(manifest); }
/** * Cleanup the manifest for writing. Cleaning up consists of adding a space * after any \n to prevent the manifest to see this newline as a delimiter. * * @param out * Output * @throws IOException */ public void writeManifest(OutputStream out) throws Exception { check(); writeManifest(getManifest(), out); }
/** * Cleanup the manifest for writing. Cleaning up consists of adding a space * after any \n to prevent the manifest to see this newline as a delimiter. * * @param out * Output * @throws IOException */ public void writeManifest(OutputStream out) throws Exception { check(); writeManifest(getManifest(), out); }
/** * Cleanup the manifest for writing. Cleaning up consists of adding a space * after any \n to prevent the manifest to see this newline as a delimiter. * * @param out Output * @throws IOException */ public void writeManifest(OutputStream out) throws Exception { check(); stripSignatures(); writeManifest(getManifest(), out); }
@Test public void isBundle_emptyManifest() throws Exception { // given Jar jar = mock(Jar.class, Mockito.RETURNS_DEEP_STUBS); when(jar.getManifest().getMainAttributes()).thenReturn(null); // when boolean isBundle = utils.isBundle(jar); // then assertFalse(isBundle); }