This is my code so far:
public class RestApplication extends Application {
private final Set<Class<?>> resourceSet;
public RestApplication() {
this.resourceSet = new HashSet<Class<?>>();
resourceSet.add(PCardController.class);
resourceSet.add(PricingController.class);
resourceSet.add(TransactionFeedController.class);
initializeMaps();
}
@Override
public Set<Class<?>> getClasses() {
return resourceSet;
// ...
} // Added by edit!
// ...
} // Added by edit!
SonarQube says that the return of a copy is a resource set.
How can I do that?