Skip to content

Commit 7b25e27

Browse files
committed
Fixed codacy errors and added on-demand imports
related to #10
1 parent 83ec8c6 commit 7b25e27

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

springfox-grails/src/main/java/springfox/documentation/grails/GrailsActionAttributes.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ private Integer score(UrlMapping mapping) {
8080
.map(Object::toString)
8181
.orElse("*");
8282

83-
int methodScore = method.equals("*") ? 1000 : 0;
84-
int actionScore = action.equals("*") ? 1000 : 0;
83+
int methodScore = "*".equals(method) ? 1000 : 0;
84+
int actionScore = "*".equals(action) ? 1000 : 0;
8585
return (actionScore * 10) + methodScore;
8686
}
8787

@@ -106,7 +106,7 @@ public String actionUrl(GrailsActionContext context, UrlMapping mapping) {
106106
return mapping.createRelativeURL(
107107
context.getController().getLogicalPropertyName(),
108108
context.getAction(),
109-
UrlMappings.pathParameters(mapping),
109+
pathParameters(mapping),
110110
"UTF-8")
111111
.replace("%7B", "{").replace("%7D", "}")
112112
.replace(linkGenerator.getServerBaseURL(), "")

springfox-grails/src/main/java/springfox/documentation/grails/Parameters.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ public static ResolvedMethodParameter bodyParameter(int parameterIndex, Resolved
3939
return new ResolvedMethodParameter(
4040
parameterIndex,
4141
"body",
42-
singletonList(SynthesizedAnnotations.REQUEST_BODY_ANNOTATION), resolvedType);
42+
singletonList(REQUEST_BODY_ANNOTATION), resolvedType);
4343
}
4444
}

0 commit comments

Comments
 (0)