PROBLEM:
Give a brief description of the problem
When epubcheck is used to verify an epub file that has a container.xml that
does not specify the full-path attribute for the rootfile element then along
with the error that reports the issue epubcheck fails with a
NullPointerException.
METHOD:
What steps will reproduce the problem?
1. Create an epub sample and remove the full-path attribute from the rootfile
element in the container.xml file
2. Check that epub with epubcheck
3. You should obtain something like below:
$ java -jar dist/epubcheck-1.1.jar testdocs/noFullPath.epub
Epubcheck Version 1.1
ERROR: testdocs/noFullPath.epub/META-INF/container.xml(4): element "rootfile"
missing required attribute "full-path"
Exception in thread "main" java.lang.NullPointerException: name
at java.util.zip.ZipFile.getEntry(ZipFile.java:144)
at com.adobe.epubcheck.ocf.OCFPackage.hasEntry(OCFPackage.java:35)
at com.adobe.epubcheck.opf.OPFChecker.runChecks(OPFChecker.java:81)
at com.adobe.epubcheck.ocf.OCFChecker.runChecks(OCFChecker.java:97)
at com.adobe.epubcheck.api.EpubCheck.validate(EpubCheck.java:143)
at com.adobe.epubcheck.tool.Checker.main(Checker.java:48)
RESULT:
epubcheck fails with a NPE.
EXPECTED:
epubcheck should not crash with a NPE, it should check for no full-path.
PLATFORM:
Latest epubcheck from trunk.
Any operating system.
Original issue reported on code.google.com by georgebina76 on 16 Feb 2011 at 10:11
Original issue reported on code.google.com by
georgebina76
on 16 Feb 2011 at 10:11