Commons Email
  1. Commons Email
  2. EMAIL-71

Email.getHostName() throws NullPointerException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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().

        Activity

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development