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

Email.getHostName() throws NullPointerException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.2
    • Labels:
      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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: