Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-396

POP3.setState() should not be public

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.2
    • None
    • POP3
    • None

    Description

      The POP3 method setState() is public. However, the state should only be settable by library methods, not by client code, otherwise the state checks won't work correctly.

      Changing the visibility would break binary compatibility.

      To maintain compatibility there could be a new method (package-private, which would give test cases access) which is allowed to set the state. Also change the public method to either do nothing or throw an UnsupportedOperationException.

      The getState() method can remain public.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: