Uploaded image for project: 'Commons Email'
  1. Commons Email
  2. EMAIL-71

Email.getHostName() throws NullPointerException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1
    • 1.2
    • None

    Description

      If setHostName() has not been called, getHostName() tries to return this.session.getProperty(MAIL_HOST). If mail session has not been created yet, this will throw a NullPointerException. getHostName() should check that this.session is not null before trying to access it.

      The same applies to getSmtpPort() and getSslSmtpPort().

      Attachments

        1. EMAIL-71-patch.txt
          1 kB
          Corey Scott

        Activity

          People

            sgoeschl Siegfried Goeschl
            teme Teemu Lång
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: