Mariangela Hills created STRATOS-971:
----------------------------------------

             Summary: Inconsistency in coding comments
                 Key: STRATOS-971
                 URL: https://issues.apache.org/jira/browse/STRATOS-971
             Project: Stratos
          Issue Type: Sub-task
          Components: REST API
    Affects Versions: 4.1.0 M4
            Reporter: Mariangela Hills


There is inconsistency in coding comments. For example in {application_id} in 
[1] and {appId} in [2] refer to the same parameter. However, the code comments 
vary. Even this does not have an impact on the end user as the parameter has 
been defined using the same name in both instances (applicationId) , this will 
have an impact on a person traversing through the source code.

----------------------------------------------------------------------------------------------------------
[1]
@GET
    @Path("/subsscriptions/{application_id}")
    @Produces("application/json")
    @Consumes("application/json")
    @AuthorizationAction("/permission/protected/manage/monitor/tenants")
    public Response getSubscriptionsOfApplication(@PathParam("application_id") 
String applicationId) throws RestAPIException {
        ApplicationSubscription subscriptions = 
StratosApiV41Utils.getApplicationSubscriptions(applicationId, 
getConfigContext());
        if(subscriptions  == null){
            return Response.status(Response.Status.NOT_FOUND).build();
        }
        return  Response.ok().entity(subscriptions).build();
    }
----------------------------------------------------------------------------------------------------------
[2]
@GET
    @Path("/application/{appId}")
    @Consumes("application/json")
    @AuthorizationAction("/permission/protected/manage/monitor/tenants")
    public Response getApplicationInfo(@PathParam("appId") String 
applicationId) throws RestAPIException {
        ApplicationBean application = 
StratosApiV41Utils.getApplicationInfo(applicationId);
        if(application == null) {
            return Response.status(Response.Status.NOT_FOUND).build();
        }else{
            return  Response.ok().entity(application).build();
        }
    }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to