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

Logic or Exception Message is incorrect in ModalWindow.setCookieName

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4.18
    • 1.5.4, 6.0.0-beta1
    • wicket
    • software

    Description

      The logic of the compound conditional statement is incorrect or the message passed to the Exception is incorrect.
      /**

      • Sets the name of the cookie that is used to remember window position (and size if the window
      • is resizable).
      • @param cookieName
      • Name of the cookie
      • @return this
        */
        public StatelessModalWindow setCookieName(String cookieName)
        Unknown macro: { if (cookieName != null && cookieName.indexOf(",") != -1 && cookieName.indexOf("|") != -1) { throw new IllegalArgumentException("Cookie name may not contain ',' or '|' characters."); } this.cookieName = cookieName; return this; }

      The logic reads:
      If the String is not null and it contains a comma and it contains a pipe, then throw the exception.

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            r.brian.amesbury R. Brian Amesbury
            Votes:
            0 Vote for this issue
            Watchers:
            1 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