aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-03-07 11:15:12 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-03-07 11:15:12 +1300
commit62ddfb226a55384fdfd1e0dd5a0436d55bb53d49 (patch)
treea13ba7b5db25d9b3b7955e325097c1060c19aedc
parent10fff38e197140d9966ca81185dc5e8f25983ffb (diff)
downloadtrackermap-server-62ddfb226a55384fdfd1e0dd5a0436d55bb53d49.tar.gz
trackermap-server-62ddfb226a55384fdfd1e0dd5a0436d55bb53d49.tar.bz2
trackermap-server-62ddfb226a55384fdfd1e0dd5a0436d55bb53d49.zip
Properly compare Java strings
-rw-r--r--src/org/traccar/api/SecurityRequestFilter.java4
1 files changed, 2 insertions, 2 deletions
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;