Wicket
  1. Wicket
  2. WICKET-5040

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

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.5.0
    • Fix Version/s: 6.6.0
    • Component/s: wicket
    • Labels:
      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.

        Issue Links

          Activity

          Sven Meier created issue -
          Sven Meier made changes -
          Field Original Value New Value
          Link This issue breaks WICKET-5036 [ WICKET-5036 ]
          Sven Meier made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 6.6.0 [ 12323963 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Sven Meier
              Reporter:
              Sven Meier
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development