Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,24 @@ public ApiTypeUtils(String javaApiProtoMappings) {
}

public static ApiType apiType(String serviceName, String methodName) {
ApiType apiType;

if (StringUtils.isEmpty(serviceName) || isEmpty(methodName)) {
apiType = ApiType.NONE;
return ApiType.NONE;

} else if (serviceName.contains("://") && !serviceName.startsWith("http")) {
apiType = ApiType.JAVA_CALL;
return ApiType.JAVA_CALL;

} else if (serviceName != null && serviceName.contains("/")) {
apiType = ApiType.REST_CALL;
} else if (serviceName.contains("/")) {
return ApiType.REST_CALL;

} else if (serviceName != null && serviceName.contains(KAFKA)) {
apiType = ApiType.KAFKA_CALL;
return ApiType.KAFKA_CALL;

} else {
apiType = ApiType.JAVA_CALL;
return ApiType.JAVA_CALL;

}

return apiType;
}

public String getQualifiedJavaApi(String url) {
Expand Down