Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-10616

ContextResolver doesn't work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 15.0.0.Beta1, 15.0.0.Final
    • 13.0.0.Final
    • REST
    • None

    Description

      I have a simple ContextResolver to set Date serialization format for my JAX-RS service, it works on 12.0.0.Final but it doesn't anymore on 13.0.0.Final :

      @Provider
      public class DateResolver implements ContextResolver<ObjectMapper>
      {
          private final ObjectMapper mapper;
      
          public DateResolver()
          {
              mapper = new ObjectMapper();
              mapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd"));
              mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
          }
      
          @Override
          public ObjectMapper getContext(Class<?> type) { return mapper; }
      }
      

      The getContext method isn't called on 13.0.0.Final.

      Attachments

        Activity

          People

            rsearls r searls
            george.trudeau George Trudeau (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: