aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/http/ServerServlet.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/http/ServerServlet.java')
-rw-r--r--src/org/traccar/http/ServerServlet.java18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/org/traccar/http/ServerServlet.java b/src/org/traccar/http/ServerServlet.java
index d814769a8..836a109fc 100644
--- a/src/org/traccar/http/ServerServlet.java
+++ b/src/org/traccar/http/ServerServlet.java
@@ -24,14 +24,18 @@ public class ServerServlet extends BaseServlet {
@Override
protected boolean handle(String command, HttpServletRequest req, HttpServletResponse resp) throws Exception {
- if (command.equals("/get")) {
- get(req, resp);
- } else if (command.equals("/update")) {
- update(req, resp);
- } else {
- return false;
+
+ switch (command) {
+ case "/get":
+ get(req, resp);
+ break;
+ case "/update":
+ update(req, resp);
+ break;
+ default:
+ return false;
}
- return true;
+ return true;
}
private void get(HttpServletRequest req, HttpServletResponse resp) throws Exception {