jersey
  1. jersey
  2. JERSEY-1554

Globally bound filter is exectued for non-existing methods, hence obviously are execute *before* resource matching

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.0-m08
    • Fix Version/s: 2.0-rc1, 2.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      « Hide

      Jersey 2.0 M08-1, JAX-RS 2.0-M12, JRE 1.7.0_07

      Description

      JAX-RS 2.0 Chapter 6.5.1 Global Binding says "As stated in Section 6.1, a global ContainerRequestFilter is executed after resource matching unless annotated with @PreMatching.".

      I tried this out and noticed that actually in RI M08-1 default-globally bound filters that I provided using Application.getSingletons() were invoked even for non-existing methods. Hence these global filters worked like if they were annotated with @PreMatching (they were not!), since something that is executed after resource matching obviously could not get executed for non-existing methods!

      If needed, I can provide a minimal sample application source code that proofs this behaviour.

      (This issue was originally reported as http://java.net/jira/browse/JAX_RS_SPEC-283)

        Activity

        Hide
        Marek Potociar added a comment -

        The issue is no longer reproducible. I've added new regressions tests to cover this scenario.

        Show
        Marek Potociar added a comment - The issue is no longer reproducible. I've added new regressions tests to cover this scenario.

          People

          • Assignee:
            Marek Potociar
            Reporter:
            mkarg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 3 hours
              3h
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 2 hours Time Not Required
              2h