Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-3271

Duplication of code in variantEndpoint classes

    XMLWordPrintable

Details

    • Task
    • Resolution: Obsolete
    • Optional
    • None
    • None
    • None
    • 3

    Description

      There is a duplication of code in jaxrs module in registry/applications package. Inspect classes:

      AdmVariantEndpoint
      AndroidVariantEndpoint
      iOSVariantEndpoint
      PushApplicationEndpoint
      SimplePushVariantEndpoint
      WindowsVariantEndpoint
      

      For example, this piece of code can be found in each of these classes :

      // 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();
       }
      
      Sustaining Triage Info

      The classes can be found here. Possible solution: separate common functions out into a utilities class

      Attachments

        Activity

          People

            Unassigned Unassigned
            polina.n.koleva Polina Koleva (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: