mirror of
https://github.com/zxing/zxing.git
synced 2024-11-09 20:44:03 -08:00
Update to Java EE 10 for zxing.org (#1621)
* Update to Java EE 10 for zxing.org * Just remove reactor convergence
This commit is contained in:
parent
1d2379df34
commit
a24f93093e
12
pom.xml
12
pom.xml
|
@ -57,7 +57,7 @@
|
|||
<module>core</module>
|
||||
<module>javase</module>
|
||||
<!-- android modules are activated by a profile below -->
|
||||
<module>zxingorg</module>
|
||||
<!-- zxingorg activated by a profile below -->
|
||||
<!-- appspot app activated by a profile below -->
|
||||
</modules>
|
||||
|
||||
|
@ -119,7 +119,6 @@
|
|||
<id>enforce</id>
|
||||
<configuration>
|
||||
<rules>
|
||||
<reactorModuleConvergence />
|
||||
<requireUpperBoundDeps />
|
||||
<dependencyConvergence />
|
||||
<requireMavenVersion>
|
||||
|
@ -757,6 +756,15 @@
|
|||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>zxingorg</id>
|
||||
<activation>
|
||||
<jdk>[17,)</jdk> <!-- Requires Java 17+ for Java EE 10+ -->
|
||||
</activation>
|
||||
<modules>
|
||||
<module>zxingorg</module>
|
||||
</modules>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>appspot</id>
|
||||
<activation>
|
||||
|
|
|
@ -31,9 +31,9 @@
|
|||
<artifactId>javase</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax</groupId>
|
||||
<artifactId>javaee-web-api</artifactId>
|
||||
<version>8.0.1</version>
|
||||
<groupId>jakarta.platform</groupId>
|
||||
<artifactId>jakarta.jakartaee-web-api</artifactId>
|
||||
<version>10.0.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -58,12 +58,6 @@
|
|||
<version>${spring.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>4.0.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<parent>
|
||||
|
@ -73,7 +67,7 @@
|
|||
</parent>
|
||||
|
||||
<properties>
|
||||
<spring.version>5.3.24</spring.version>
|
||||
<spring.version>6.0.8</spring.version>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -18,10 +18,10 @@ package com.google.zxing.web;
|
|||
|
||||
import com.google.common.net.HttpHeaders;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterConfig;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.Filter;
|
||||
import jakarta.servlet.FilterConfig;
|
||||
import jakarta.servlet.ServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* Provides no-op default implementations for convenience of subclasses.
|
||||
|
@ -37,7 +37,7 @@ abstract class AbstractFilter implements Filter {
|
|||
public final void destroy() {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
static void redirect(ServletResponse servletResponse, String location) {
|
||||
HttpServletResponse response = (HttpServletResponse) servletResponse;
|
||||
response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
package com.google.zxing.web;
|
||||
|
||||
import javax.servlet.annotation.WebFilter;
|
||||
import javax.servlet.annotation.WebInitParam;
|
||||
import jakarta.servlet.annotation.WebFilter;
|
||||
import jakarta.servlet.annotation.WebInitParam;
|
||||
|
||||
/**
|
||||
* Protect the /chart endpoint from too many requests.
|
||||
|
|
|
@ -27,11 +27,11 @@ import com.google.zxing.common.BitMatrix;
|
|||
import com.google.zxing.qrcode.QRCodeWriter;
|
||||
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
|
||||
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.ServletRequest;
|
||||
import jakarta.servlet.annotation.WebServlet;
|
||||
import jakarta.servlet.http.HttpServlet;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
package com.google.zxing.web;
|
||||
|
||||
import javax.servlet.annotation.WebFilter;
|
||||
import javax.servlet.annotation.WebInitParam;
|
||||
import jakarta.servlet.annotation.WebFilter;
|
||||
import jakarta.servlet.annotation.WebInitParam;
|
||||
|
||||
/**
|
||||
* Protect the /decode endpoint from too many requests.
|
||||
|
|
|
@ -65,17 +65,17 @@ import java.util.logging.Logger;
|
|||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.servlet.RequestDispatcher;
|
||||
import javax.servlet.ServletConfig;
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.annotation.MultipartConfig;
|
||||
import javax.servlet.annotation.WebInitParam;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.Part;
|
||||
import jakarta.servlet.RequestDispatcher;
|
||||
import jakarta.servlet.ServletConfig;
|
||||
import jakarta.servlet.ServletContext;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.annotation.MultipartConfig;
|
||||
import jakarta.servlet.annotation.WebInitParam;
|
||||
import jakarta.servlet.annotation.WebServlet;
|
||||
import jakarta.servlet.http.HttpServlet;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.Part;
|
||||
|
||||
/**
|
||||
* {@link HttpServlet} which decodes images containing barcodes. Given a URL, it will
|
||||
|
|
|
@ -18,14 +18,14 @@ package com.google.zxing.web;
|
|||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.Filter;
|
||||
import jakarta.servlet.FilterChain;
|
||||
import jakarta.servlet.FilterConfig;
|
||||
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;
|
||||
import java.util.Timer;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
|
||||
package com.google.zxing.web;
|
||||
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.annotation.WebFilter;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.FilterChain;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.ServletRequest;
|
||||
import jakarta.servlet.ServletResponse;
|
||||
import jakarta.servlet.annotation.WebFilter;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
|
|
@ -16,14 +16,14 @@
|
|||
|
||||
package com.google.zxing.web;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import jakarta.servlet.ServletContext;
|
||||
import java.util.logging.Formatter;
|
||||
import java.util.logging.Handler;
|
||||
import java.util.logging.LogRecord;
|
||||
|
||||
/**
|
||||
* A {@link Handler} that redirects log messages to the servlet container log.
|
||||
*
|
||||
*
|
||||
* @author Sean Owen
|
||||
*/
|
||||
final class ServletContextLogHandler extends Handler {
|
||||
|
@ -61,4 +61,4 @@ final class ServletContextLogHandler extends Handler {
|
|||
// do nothing
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,15 +19,15 @@ package com.google.zxing.web;
|
|||
import com.google.common.util.concurrent.SimpleTimeLimiter;
|
||||
import com.google.common.util.concurrent.TimeLimiter;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.annotation.WebFilter;
|
||||
import javax.servlet.annotation.WebInitParam;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.Filter;
|
||||
import jakarta.servlet.FilterChain;
|
||||
import jakarta.servlet.FilterConfig;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.ServletRequest;
|
||||
import jakarta.servlet.ServletResponse;
|
||||
import jakarta.servlet.annotation.WebFilter;
|
||||
import jakarta.servlet.annotation.WebInitParam;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
|
||||
package com.google.zxing.web;
|
||||
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.annotation.WebFilter;
|
||||
import jakarta.servlet.FilterChain;
|
||||
import jakarta.servlet.ServletRequest;
|
||||
import jakarta.servlet.ServletResponse;
|
||||
import jakarta.servlet.annotation.WebFilter;
|
||||
|
||||
/**
|
||||
* Handles redirects to the app landing page.
|
||||
|
|
|
@ -23,7 +23,7 @@ import org.springframework.mock.web.MockHttpServletResponse;
|
|||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* Tests {@link ChartServlet}.
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.springframework.mock.web.MockServletConfig;
|
|||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* Tests {@link DecodeServlet}.
|
||||
|
|
|
@ -23,9 +23,9 @@ import org.springframework.mock.web.MockFilterConfig;
|
|||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.Filter;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.springframework.mock.web.MockFilterChain;
|
|||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* Tests {@link HTTPSFilter}.
|
||||
|
|
|
@ -23,12 +23,12 @@ import org.springframework.mock.web.MockFilterConfig;
|
|||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.GenericServlet;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.Filter;
|
||||
import jakarta.servlet.FilterChain;
|
||||
import jakarta.servlet.GenericServlet;
|
||||
import jakarta.servlet.ServletRequest;
|
||||
import jakarta.servlet.ServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* Tests {@link TimeoutFilter}.
|
||||
|
|
|
@ -23,8 +23,8 @@ import org.springframework.mock.web.MockFilterChain;
|
|||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.FilterChain;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* Tests {@link WelcomeFilter}.
|
||||
|
|
Loading…
Reference in a new issue