Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException thrown trying to access MANIFEST.MF of embedded jars #41

Open
GoogleCodeExporter opened this issue Apr 7, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

        Enumeration<URL> mfs = classLoader.getResources(JarFile.MANIFEST_NAME);

        while (mfs.hasMoreElements()) {
            URL u = mfs.nextElement();
            Manifest mf = new Manifest(u.openStream());
            processJarFile(mf);
        }

Try to access the MANIFEST.MF file when one of the embedded jars does not have 
the MANIFEST.MF entry as the 1st or 2nd entry in the jar.  Like aspectjrt 

What is the expected output? What do you see instead?

Caused by: java.lang.NullPointerException
    at com.simontuffs.onejar.OneJarFile.getInputStream(OneJarFile.java:116)
    at com.simontuffs.onejar.OneJarURLConnection.getInputStream(OneJarURLConnection.java:51)
    at java.net.URL.openStream(URL.java:1037)

What version of onejar-maven-plugin are you using?

1.4.4

What is the output of "mvn -version" on your machine?
3.2.3

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 3 Nov 2014 at 9:15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant