There is a duplication of code in jaxrs module in registry/applications package. Inspect classes: {code} AdmVariantEndpoint AndroidVariantEndpoint iOSVariantEndpoint PushApplicationEndpoint SimplePushVariantEndpoint WindowsVariantEndpoint {code} For example, this piece of code can be found in each of these classes : {code} // some model validation on the uploaded form try { validateModelClass(form); } catch (ConstraintViolationException cve) { // Build and return the 400 (Bad Request) response ResponseBuilder builder = createBadRequestResponse(cve.getConstraintViolations()); return builder.build(); } {code}
{panel:title=Sustaining Triage Info} The classes can be found [here|https://github.com/aerogear/aerogear-unifiedpush-server/tree/master/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications]. Possible solution: separate common functions out into a utilities class {panel} |
|