Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6854

Application subclass can't be injected into an application lass field

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 3.1.6, 3.0.9
    • 3.0.10, 3.1.7, 3.2.0
    • JAX-RS
    • None
    • Unknown

    Description

      public class MyApplication extends Application {
      @Context
      Application application;
      @Context
      UriInfo info;
      @Context
      Request request;
      @Context
      HttpHeaders headers;
      public java.util.Set<java.lang.Class<?>> getClasses()

      { Set<Class<?>> resources = new HashSet<Class<?>>(); resources.add(Resource.class); return resources; }

      The application field is expected to be injected with value of MyApplication object(this), not a null value after this application is started.

      Attachments

        1. injectionUtil.diff
          1 kB
          Jim Ma

        Activity

          People

            ema Jim Ma
            ema Jim Ma
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: