Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5976

Improve the documentation of FeedbackMessages first(int level)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 7.0.0
    • 6.21.0, 7.1.0
    • wicket
    • None

    Description

      FeedbackMessages method public final FeedbackMessage first(int level) has documentation specifying that it "Retrieves the first message matching the specified level" when in fact it calls FeedbackMessage's isLevel(int level) which "Returns whether this level is greater than or equal to the given level." which is also poorly named as it doesn't return whether the FeedbackMessage is of the specified level; it returns if it's of the specified level or more severe.

      In my opinion both the current functionality and the functionality to return only those messages of a specified level are desirable. A minimal solution is an update to the documentation of FeedbackMessage's first(int level) method but I think the methods should be renamed to say what they actually do.

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            robertandrewbain Robert Bain
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 3h
                3h
                Remaining:
                Remaining Estimate - 3h
                3h
                Logged:
                Time Spent - Not Specified
                Not Specified