Behavior change when using the Application.getSingletons() method

This rule flags implementations of the Application.getSingletons() method. In JAX-RS 2.x, if a class which uses CDI annotations is added to the set returned by getSingletons(), CDI is automatically used to retrieve an instance of that class which allows CDI injection within that instance to work. In RESTful Web Services 3.0, users are required to retrieve an instance of each singleton class from CDI and add that instance to the set returned by getSingletons(). Singleton classes which do not contain CDI annotations can still be added by class definition.

See CDI injection with the Application.getSingletons() method for more information on this behavior change and the workaround.