Skip to content

Commit 6d4d81b

Browse files
authored
Not compare Java String with "=="
Replaced with equals()
1 parent 6e561e1 commit 6d4d81b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/swagger-codegen/src/main/resources/Java/auth/ApiKeyAuth.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ public class ApiKeyAuth implements Authentication {
5555
} else {
5656
value = apiKey;
5757
}
58-
if (location == "query") {
58+
if ("query".equals(location)) {
5959
queryParams.add(new Pair(paramName, value));
60-
} else if (location == "header") {
60+
} else if ("header".equals(location)) {
6161
headerParams.put(paramName, value);
6262
}
6363
}

0 commit comments

Comments
 (0)