Improve abstract class ResultLabelEvent

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Fixed
    • 5.0
    • Component/s: None
    • None

      The class com.atlassian.bamboo.event.ResultLabelEvent takes a com.atlassian.user.User in the constructor.

      However, the class members only store the :

      private final String username;

      with a getUsername() method.

      With this setup the ResultLabelEvent essentially drops the other User-related fields passed to the constructor. If you are writing plugins and write a Listener that catches the ResultLabelEvent it would be REALLY useful to get the other fields in the User object other than just the Username without having to inject a user manager and re-lookup the User object using the username.

      I would vote for a private member :

      private final User user;

      with a getter of :

      public User getUser(){}

      This would allow the subclasses ResultLabelAddedEvent and ResultLabelRemovedEvent access to the User object instead of JUST the Username String.

            Assignee:
            Unassigned
            Reporter:
            Adam Myatt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: