felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sahoo (JIRA)" <j...@apache.org>
Subject [jira] Created: (FELIX-2317) Possible NPE for jars with null Manifest
Date Mon, 03 May 2010 14:20:55 GMT
Possible NPE for jars with null Manifest
----------------------------------------

                 Key: FELIX-2317
                 URL: https://issues.apache.org/jira/browse/FELIX-2317
             Project: Felix
          Issue Type: Bug
          Components: Framework
            Reporter: Sahoo


JarFile.getManifest() can return null, so to avoid NPE, code must check for null return value.
The following code in framework does not do so:

    public Map getManifestHeader() throws Exception
    {
        // Get the embedded resource.
        Manifest mf = m_jarFile.getManifest();
        // Create a case insensitive map of manifest attributes.
        return new StringMap(mf.getMainAttributes(), false);
    }


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message