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

Session.exists() returns false when ThreadContext#session is not set to current session

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.5.0
    • 6.6.0
    • wicket
    • None

    Description

      There are several places in Wicket which check for the existence of a Session before actually getting a reference to it, e.g. FeedbackCollector:

      public final List<FeedbackMessage> collect(final IFeedbackMessageFilter filter)
      {
      ...
      if (includeSession && Session.exists())

      { messages.addAll(Session.get().getFeedbackMessages().messages(filter)); }

      }

      If no one has called Session#get(), all calls to Session#exists() return false although a session might exist in the session store, i.e. it might just not be set to ThreadContext#session already.

      Attachments

        Issue Links

          Activity

            People

              svenmeier Sven Meier
              svenmeier Sven Meier
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: