MailcapCommandMap("missingFile") throws NullPointerException

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 1.0fcs
    • Affects Version/s: alpha
    • Component/s: other-libs
    • None
    • 1.0fcs
    • generic
    • solaris_2.6
    • Verified

        If a filename for a nonexistent or inaccessible file is passed to the MailcapCommandMap(String fileName) constructor, the resulting stack trace is dumped from MailcapFile(String fileName)
        java.io.FileNotFoundException: SomeFileWhichDoesntExist
                at java.io.FileInputStream.<init>(FileInputStream.java)
                at java.io.FileReader.<init>(FileReader.java)
                at com.sun.activation.registries.MailcapFile.<init>(MailcapFile.java:41)
                at javax.activation.MailcapCommandMap.<init>(MailcapCommandMap.java:174)
                at javasoft.sqe.tests.api.javax.activation.MailcapCommandMap.MailcapCommandMapTest.subFileTest(MailcapCommandMapTest.java:130
                at javasoft.sqe.jck.lib.MultiTest.run(MultiTest.java:158)
                at javasoft.sqe.tests.api.javax.activation.MailcapCommandMap.MailcapCommandMapTest.main(MailcapCommandMapTest.java:29)

        The MailcapFile constructor then passes the still null reader to this.createMailcapHash(reader), eventually leading to a NullPointerException.

        Both the NullPointerException and the stack trace are unacceptable for FCS software.

              Assignee:
              J. Duke
              Reporter:
              J. Duke
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: