Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-2847

RESTEasy should have some Provider to produce primitive types without @Produces annotation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 7.0.1.CR1, 7.0.1.GA
    • 7.0.0.ER4
    • REST
    • None
    • EAP 7.0.1

      RESTEasy should have some Provider to produce primitive types without @Produces annotation

      In RESTEasy 2, DefaultTextPlain provider was used to process return value of end-points, that don't have @Produces annotation and return primitives:

      @Path("postInt")
      @POST
      public Response postInt() throws Exception {
      	return Response.ok().entity(new Integer(8)).build();
      }
      

      In RESTEasy 3, DefaultTextPlain is not used (see comments of this jira). RESTEasy should contains provider for this purpose.

      This jira solves partially JBEAP-4725

        1. default-media-type.zip
          9 kB
        2. DefaultNumberWriter.java
          4 kB
        3. re-spec-part.png
          re-spec-part.png
          45 kB
        4. re-spec-part2.png
          re-spec-part2.png
          14 kB

              weli@redhat.com Weinan Li
              kanovotn Katerina Odabasi
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: