Skip to content

Commit

Permalink
Remove: Replicate Static Import
Browse files Browse the repository at this point in the history
  • Loading branch information
BLasan committed Dec 21, 2023
1 parent a5fb64c commit a049e86
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
import java.util.Map;

import static org.apache.axis2.context.MessageContext.TRANSPORT_HEADERS;
import static org.wso2.carbon.apimgt.gateway.APIMgtGatewayConstants.HTTP_METHOD;
import static org.wso2.carbon.apimgt.gateway.handlers.analytics.Constants.UNKNOWN_VALUE;

public class SynapseAnalyticsDataProvider implements AnalyticsDataProvider {
Expand Down Expand Up @@ -175,9 +174,9 @@ public API getApi() throws DataNotFoundException {
org.wso2.carbon.apimgt.common.analytics.publishers.dto.URITemplate uriTemplateObj
= new org.wso2.carbon.apimgt.common.analytics.publishers.dto.URITemplate();
if (uriTemplate.getHttpMethod() != null && uriTemplate.getHttpMethod()
.equals(messageContext.getProperty(HTTP_METHOD)) && uriTemplate.getUrlPattern() != null
&& uriTemplate.getUrlPattern().equals(messageContext.getProperty("API_ELECTED_RESOURCE"))) {

.equals(messageContext.getProperty(APIMgtGatewayConstants.HTTP_METHOD))
&& uriTemplate.getUrlPattern() != null && uriTemplate.getUrlPattern()
.equals(messageContext.getProperty("API_ELECTED_RESOURCE"))) {
uriTemplateObj.setResourceURI(uriTemplate.getUrlPattern());
uriTemplateObj.setHttpVerb(uriTemplate.getHttpMethod());
uriTemplateObj.setAuthScheme(uriTemplate.getAuthScheme());
Expand Down Expand Up @@ -234,7 +233,7 @@ public Application getApplication() throws DataNotFoundException {
@Override
public Operation getOperation() throws DataNotFoundException {

String httpMethod = (String) messageContext.getProperty(HTTP_METHOD);
String httpMethod = (String) messageContext.getProperty(APIMgtGatewayConstants.HTTP_METHOD);
String apiResourceTemplate = (String) messageContext.getProperty(APIConstants.API_ELECTED_RESOURCE);
Operation operation = new Operation();
operation.setApiMethod(httpMethod);
Expand Down

0 comments on commit a049e86

Please sign in to comment.