From 62ddfb226a55384fdfd1e0dd5a0436d55bb53d49 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 7 Mar 2016 11:15:12 +1300 Subject: Properly compare Java strings --- src/org/traccar/api/SecurityRequestFilter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/org/traccar/api') diff --git a/src/org/traccar/api/SecurityRequestFilter.java b/src/org/traccar/api/SecurityRequestFilter.java index d4fb15059..4c6137ede 100644 --- a/src/org/traccar/api/SecurityRequestFilter.java +++ b/src/org/traccar/api/SecurityRequestFilter.java @@ -56,8 +56,8 @@ public class SecurityRequestFilter implements ContainerRequestFilter { @Override public void filter(ContainerRequestContext requestContext) { - if (requestContext.getMethod() == "OPTIONS") { - throw new WebApplicationException(Response.status(Response.Status.OK).entity("").build()); + if (requestContext.getMethod().equals("OPTIONS")) { + throw new WebApplicationException(Response.status(Response.Status.OK).build()); } SecurityContext securityContext = null; -- cgit v1.2.3