Skip to content

Commit

Permalink
[ISSUE #3002] flipped the string comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
dipankr committed Apr 17, 2023
1 parent 58b5ab7 commit effa041
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void get(HttpExchange httpExchange) throws IOException {
);
getRegistryResponseList.add(getRegistryResponse);
}
getRegistryResponseList.sort(Comparator.comparing(lhs -> lhs.getEventMeshClusterName()));
getRegistryResponseList.sort(Comparator.comparing(GetRegistryResponse::getEventMeshClusterName));

String result = JsonUtils.toJSONString(getRegistryResponseList);
httpExchange.sendResponseHeaders(200, result.getBytes().length);
Expand Down Expand Up @@ -117,10 +117,10 @@ void get(HttpExchange httpExchange) throws IOException {

@Override
public void handle(HttpExchange httpExchange) throws IOException {
if (httpExchange.getRequestMethod().equals("OPTION")) {
if ("OPTION".equals(httpExchange.getRequestMethod())) {
preflight(httpExchange);
}
if (httpExchange.getRequestMethod().equals("GET")) {
if ("GET".equals(httpExchange.getRequestMethod())) {
get(httpExchange);
}
}
Expand Down

0 comments on commit effa041

Please sign in to comment.