From 6d4d81b652944a548b9a2ab89979651f9abcab05 Mon Sep 17 00:00:00 2001 From: Bochun Bai Date: Wed, 13 Jul 2016 17:27:11 +0800 Subject: [PATCH] Not compare Java String with "==" Replaced with equals() --- .../src/main/resources/Java/auth/ApiKeyAuth.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/Java/auth/ApiKeyAuth.mustache b/modules/swagger-codegen/src/main/resources/Java/auth/ApiKeyAuth.mustache index f73a6f5b3f8f..5af060f11739 100644 --- a/modules/swagger-codegen/src/main/resources/Java/auth/ApiKeyAuth.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/auth/ApiKeyAuth.mustache @@ -55,9 +55,9 @@ public class ApiKeyAuth implements Authentication { } else { value = apiKey; } - if (location == "query") { + if ("query".equals(location)) { queryParams.add(new Pair(paramName, value)); - } else if (location == "header") { + } else if ("header".equals(location)) { headerParams.put(paramName, value); } }