aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/web
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-08-19 13:25:39 -0700
committerAnton Tananaev <anton@traccar.org>2023-08-19 13:25:39 -0700
commit9df5d93ba0482b628d05b10c29100144beed5b5d (patch)
tree529e9a90c7b4073c5f72ee1fe849bfb3e10fbd5f /src/main/java/org/traccar/web
parent51712e33c363d5150cfd690d6f3c466a38ab6ba3 (diff)
downloadtrackermap-server-9df5d93ba0482b628d05b10c29100144beed5b5d.tar.gz
trackermap-server-9df5d93ba0482b628d05b10c29100144beed5b5d.tar.bz2
trackermap-server-9df5d93ba0482b628d05b10c29100144beed5b5d.zip
Move from javax to jakarta
Diffstat (limited to 'src/main/java/org/traccar/web')
-rw-r--r--src/main/java/org/traccar/web/ConsoleServlet.java8
-rw-r--r--src/main/java/org/traccar/web/ModernDefaultServlet.java2
-rw-r--r--src/main/java/org/traccar/web/OverrideFilter.java18
-rw-r--r--src/main/java/org/traccar/web/ResponseWrapper.java8
-rw-r--r--src/main/java/org/traccar/web/ThrottlingFilter.java14
-rw-r--r--src/main/java/org/traccar/web/WebInjectionManagerFactory.java2
-rw-r--r--src/main/java/org/traccar/web/WebServer.java10
7 files changed, 31 insertions, 31 deletions
diff --git a/src/main/java/org/traccar/web/ConsoleServlet.java b/src/main/java/org/traccar/web/ConsoleServlet.java
index 902a4f7a9..0012ba077 100644
--- a/src/main/java/org/traccar/web/ConsoleServlet.java
+++ b/src/main/java/org/traccar/web/ConsoleServlet.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 - 2022 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2023 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
package org.traccar.web;
import org.h2.server.web.ConnectionInfo;
-import org.h2.server.web.WebServlet;
+import org.h2.server.web.JakartaWebServlet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.traccar.config.Config;
@@ -26,7 +26,7 @@ import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-public class ConsoleServlet extends WebServlet {
+public class ConsoleServlet extends JakartaWebServlet {
private static final Logger LOGGER = LoggerFactory.getLogger(ConsoleServlet.class);
@@ -41,7 +41,7 @@ public class ConsoleServlet extends WebServlet {
super.init();
try {
- Field field = WebServlet.class.getDeclaredField("server");
+ Field field = JakartaWebServlet.class.getDeclaredField("server");
field.setAccessible(true);
org.h2.server.web.WebServer server = (org.h2.server.web.WebServer) field.get(this);
diff --git a/src/main/java/org/traccar/web/ModernDefaultServlet.java b/src/main/java/org/traccar/web/ModernDefaultServlet.java
index 7911c0e7f..a7c8cdb29 100644
--- a/src/main/java/org/traccar/web/ModernDefaultServlet.java
+++ b/src/main/java/org/traccar/web/ModernDefaultServlet.java
@@ -20,7 +20,7 @@ import org.eclipse.jetty.util.resource.Resource;
import org.traccar.config.Config;
import org.traccar.config.Keys;
-import javax.inject.Inject;
+import jakarta.inject.Inject;
import java.io.File;
import java.io.IOException;
diff --git a/src/main/java/org/traccar/web/OverrideFilter.java b/src/main/java/org/traccar/web/OverrideFilter.java
index 6d20789f2..f870c4147 100644
--- a/src/main/java/org/traccar/web/OverrideFilter.java
+++ b/src/main/java/org/traccar/web/OverrideFilter.java
@@ -20,15 +20,15 @@ import org.traccar.api.security.PermissionsService;
import org.traccar.model.Server;
import org.traccar.storage.StorageException;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.inject.Inject;
+import jakarta.inject.Singleton;
+import jakarta.servlet.Filter;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
@Singleton
diff --git a/src/main/java/org/traccar/web/ResponseWrapper.java b/src/main/java/org/traccar/web/ResponseWrapper.java
index c6179a33e..a0eaf6788 100644
--- a/src/main/java/org/traccar/web/ResponseWrapper.java
+++ b/src/main/java/org/traccar/web/ResponseWrapper.java
@@ -15,10 +15,10 @@
*/
package org.traccar.web;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.WriteListener;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpServletResponseWrapper;
+import jakarta.servlet.ServletOutputStream;
+import jakarta.servlet.WriteListener;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponseWrapper;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
diff --git a/src/main/java/org/traccar/web/ThrottlingFilter.java b/src/main/java/org/traccar/web/ThrottlingFilter.java
index 6d2328562..1bad33db6 100644
--- a/src/main/java/org/traccar/web/ThrottlingFilter.java
+++ b/src/main/java/org/traccar/web/ThrottlingFilter.java
@@ -19,13 +19,13 @@ import org.eclipse.jetty.servlets.DoSFilter;
import org.traccar.config.Config;
import org.traccar.config.Keys;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
+import jakarta.inject.Inject;
+import jakarta.inject.Singleton;
+import jakarta.servlet.FilterConfig;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpSession;
@Singleton
public class ThrottlingFilter extends DoSFilter {
diff --git a/src/main/java/org/traccar/web/WebInjectionManagerFactory.java b/src/main/java/org/traccar/web/WebInjectionManagerFactory.java
index 14d9d3dbc..3e73c41ad 100644
--- a/src/main/java/org/traccar/web/WebInjectionManagerFactory.java
+++ b/src/main/java/org/traccar/web/WebInjectionManagerFactory.java
@@ -23,7 +23,7 @@ import org.jvnet.hk2.guice.bridge.api.GuiceBridge;
import org.jvnet.hk2.guice.bridge.api.GuiceIntoHK2Bridge;
import org.traccar.Main;
-import javax.annotation.Priority;
+import jakarta.annotation.Priority;
@Priority(20)
public class WebInjectionManagerFactory implements InjectionManagerFactory {
diff --git a/src/main/java/org/traccar/web/WebServer.java b/src/main/java/org/traccar/web/WebServer.java
index 184c546d5..5f27f7662 100644
--- a/src/main/java/org/traccar/web/WebServer.java
+++ b/src/main/java/org/traccar/web/WebServer.java
@@ -52,11 +52,11 @@ import org.traccar.config.Config;
import org.traccar.config.Keys;
import org.traccar.helper.ObjectMapperContextResolver;
-import javax.servlet.DispatcherType;
-import javax.servlet.ServletException;
-import javax.servlet.SessionCookieConfig;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.DispatcherType;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.SessionCookieConfig;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import javax.sql.DataSource;
import java.io.File;
import java.io.IOException;