[ https://issues.apache.org/jira/browse/FELIX-2318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet resolved FELIX-2318. ------------------------------------ Resolution: Fixed Fix Version/s: fileinstall-3.1.0 Assignee: Guillaume Nodet Committing to https://svn.apache.org/repos/asf/felix/trunk ... M fileinstall/src/main/java/org/apache/felix/fileinstall/internal/BundleTransformer.java M fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java Committed r1027387 > Possible NPE for jars with null Manifest > ---------------------------------------- > > Key: FELIX-2318 > URL: https://issues.apache.org/jira/browse/FELIX-2318 > Project: Felix > Issue Type: Bug > Components: File Install > Reporter: Sahoo > Assignee: Guillaume Nodet > Fix For: fileinstall-3.1.0 > > > JarFile.getManifest() can return null, so caller must check return value for > null-ness to avoid NPE. I see two such occurrences in fileinstall: > DirectoryWatcher.java: > private Bundle installOrUpdateBundle( > String bundleLocation, BufferedInputStream is, long checksum) > throws IOException, BundleException > { > is.mark(256 * 1024); > JarInputStream jar = new JarInputStream(is); > Manifest m = jar.getManifest(); > String sn = > m.getMainAttributes().getValue(Constants.BUNDLE_SYMBOLICNAME); > ... > BundleTransformer.java: > Manifest m = jar.getManifest(); > if (m.getMainAttributes().getValue(new > Attributes.Name("Bundle-SymbolicName")) != null) > ... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.