jersey
  1. jersey
  2. JERSEY-1460

Application.getClasses() can return invalid classes but implementation have to handle that gracefully.

    Details

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

      Description

      providing set which contains "null" ends in

      Exception in thread "main" java.lang.NullPointerException
      	at org.glassfish.jersey.server.model.Resource.isAcceptable(Resource.java:487)
      	at org.glassfish.jersey.server.model.IntrospectionModeller.createResourceBuilder(IntrospectionModeller.java:118)
      	at org.glassfish.jersey.server.model.Resource.from(Resource.java:445)
      	at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:271)
      	at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:234)
      	at org.glassfish.jersey.server.ContainerFactory.createContainer(ContainerFactory.java:79)
      	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory.createHttpServer(GrizzlyHttpServerFactory.java:105)
      	at org.glassfish.jersey.examples.helloworld.App.main(App.java:65)
      	...

      when only warning should be logged and application started (according to javax.ws.rs.core.Application.getClasses() javadoc).

        Activity

        Pavel Bucek created issue -
        Pavel Bucek logged work - 10/Oct/12 3:39 PM
        • Time Spent:
          2 hours
           
          implementation + tests (including ResourceConfig.add*() methods)
        Pavel Bucek made changes -
        Field Original Value New Value
        Assignee Pavel Bucek [ pavel_bucek ]
        Pavel Bucek made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Pavel Bucek made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 2 hours [ 7200 ]
        Pavel Bucek logged work - 11/Oct/12 9:51 AM
        • Time Spent:
          1 hour
           
          incorporating review comments
        Pavel Bucek made changes -
        Time Spent 2 hours [ 7200 ] 3 hours [ 10800 ]
        Pavel Bucek made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Fix Version/s 2.0 [ 15271 ]
        Resolution Fixed [ 1 ]
        Marek Potociar made changes -
        Fix Version/s 2.0 [ 15271 ]
        Fix Version/s 2.0-m09 [ 16050 ]
        Fix Version/s 2.0-unplanned [ 15288 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

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