jersey
  1. jersey
  2. JERSEY-1572

Jersey cannot have resource methods that have return type void

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0-m09
    • Fix Version/s: 2.0-rc1, 2.0
    • Component/s: core
    • Labels:
      None

      Description

      When deploying the following resource

      @Path("resource")
      public class Resource {
      	@GET
      	@Path("error")
      	public void error(){
      	}
      }
      

      I got

      WARNING: A HTTP GET method, public void com.sun.ts.tests.jaxrs.ee.rs.container.asyncresponse.Resource.error(), MUST return a non-void type.

      But the spec. Section 3.3.3 Return Type defines void as valid return type.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Pavel Bucek
            Reporter:
            jan.supol
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 3 hours Original Estimate - 3 hours
              3h
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 5 hours
              5h