Skip to content

Commit

Permalink
EE 9 to EE 10
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Jan 7, 2025
1 parent 41211aa commit 60a73e2
Show file tree
Hide file tree
Showing 21 changed files with 168 additions and 251 deletions.
6 changes: 3 additions & 3 deletions core/maven-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
<dependency>
<groupId>jakarta.servlet.jsp.jstl</groupId>
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
<version>2.0.0</version>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>5.0.0</version>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.servlet.jsp</groupId>
<artifactId>jakarta.servlet.jsp-api</artifactId>
<version>3.0.0</version>
<version>3.1.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
10 changes: 5 additions & 5 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>5.0.0</version>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -145,13 +145,13 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9</groupId>
<artifactId>jetty-ee9-servlet</artifactId>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-servlet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9</groupId>
<artifactId>jetty-ee9-webapp</artifactId>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-webapp</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
47 changes: 9 additions & 38 deletions core/src/main/java/io/jenkins/servlet/ServletContextWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collections;
import java.util.Enumeration;
import java.util.EventListener;
import java.util.Map;
Expand Down Expand Up @@ -93,37 +92,11 @@ public jakarta.servlet.RequestDispatcher getNamedDispatcher(String path) {
: null;
}

@Override
public jakarta.servlet.Servlet getServlet(String name) throws jakarta.servlet.ServletException {
try {
return ServletWrapper.toJakartaServlet(from.getServlet(name));
} catch (ServletException e) {
throw ServletExceptionWrapper.toJakartaServletException(e);
}
}

@Override
public Enumeration<jakarta.servlet.Servlet> getServlets() {
return Collections.enumeration(Collections.list(from.getServlets()).stream()
.map(ServletWrapper::toJakartaServlet)
.collect(Collectors.toList()));
}

@Override
public Enumeration<String> getServletNames() {
return from.getServletNames();
}

@Override
public void log(String msg) {
from.log(msg);
}

@Override
public void log(Exception exception, String msg) {
from.log(exception, msg);
}

@Override
public void log(String message, Throwable throwable) {
from.log(message, throwable);
Expand Down Expand Up @@ -440,24 +413,21 @@ public RequestDispatcher getNamedDispatcher(String name) {
}

@Override
public Servlet getServlet(String name) throws ServletException {
try {
return ServletWrapper.fromJakartaServlet(from.getServlet(name));
} catch (jakarta.servlet.ServletException e) {
throw ServletExceptionWrapper.fromJakartaServletException(e);
}
public Servlet getServlet(String name) {
// TODO implement this

Check warning on line 417 in core/src/main/java/io/jenkins/servlet/ServletContextWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}

@Override
public Enumeration<Servlet> getServlets() {
return Collections.enumeration(Collections.list(from.getServlets()).stream()
.map(ServletWrapper::fromJakartaServlet)
.collect(Collectors.toList()));
// TODO implement this

Check warning on line 423 in core/src/main/java/io/jenkins/servlet/ServletContextWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}

@Override
public Enumeration<String> getServletNames() {
return from.getServletNames();
// TODO implement this

Check warning on line 429 in core/src/main/java/io/jenkins/servlet/ServletContextWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}

@Override
Expand All @@ -467,7 +437,8 @@ public void log(String msg) {

@Override
public void log(Exception exception, String msg) {
from.log(exception, msg);
// TODO implement this

Check warning on line 440 in core/src/main/java/io/jenkins/servlet/ServletContextWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}

@Override
Expand Down
27 changes: 21 additions & 6 deletions core/src/main/java/io/jenkins/servlet/ServletRequestWrapper.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.jenkins.servlet;

import jakarta.servlet.ServletConnection;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
Expand Down Expand Up @@ -170,11 +171,6 @@ public jakarta.servlet.RequestDispatcher getRequestDispatcher(String path) {
: null;
}

@Override
public String getRealPath(String path) {
return from.getRealPath(path);
}

@Override
public int getRemotePort() {
return from.getRemotePort();
Expand Down Expand Up @@ -233,6 +229,24 @@ public jakarta.servlet.DispatcherType getDispatcherType() {
return DispatcherTypeWrapper.toJakartaDispatcherType(from.getDispatcherType());
}

@Override
public String getRequestId() {
// TODO implement this

Check warning on line 234 in core/src/main/java/io/jenkins/servlet/ServletRequestWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}

@Override
public String getProtocolRequestId() {
// TODO implement this

Check warning on line 240 in core/src/main/java/io/jenkins/servlet/ServletRequestWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}

@Override
public ServletConnection getServletConnection() {
// TODO implement this

Check warning on line 246 in core/src/main/java/io/jenkins/servlet/ServletRequestWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}

@Override
public ServletRequest toJavaxServletRequest() {
return from;
Expand Down Expand Up @@ -380,7 +394,8 @@ public RequestDispatcher getRequestDispatcher(String path) {

@Override
public String getRealPath(String path) {
return from.getRealPath(path);
// TODO implement this

Check warning on line 397 in core/src/main/java/io/jenkins/servlet/ServletRequestWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.jenkins.servlet;

import java.util.Map;
import java.util.Objects;
import javax.servlet.SessionCookieConfig;

Expand Down Expand Up @@ -76,6 +77,24 @@ public void setMaxAge(int maxAge) {
public int getMaxAge() {
return from.getMaxAge();
}

@Override
public void setAttribute(String name, String value) {
// TODO implement this

Check warning on line 83 in core/src/main/java/io/jenkins/servlet/SessionCookieConfigWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}

@Override
public String getAttribute(String name) {
// TODO implement this

Check warning on line 89 in core/src/main/java/io/jenkins/servlet/SessionCookieConfigWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}

@Override
public Map<String, String> getAttributes() {
// TODO implement this

Check warning on line 95 in core/src/main/java/io/jenkins/servlet/SessionCookieConfigWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ public String getElIgnored() {
return from.getElIgnored();
}

@Override
public String getErrorOnELNotFound() {
// TODO implement this

Check warning on line 24 in core/src/main/java/io/jenkins/servlet/descriptor/JspPropertyGroupDescriptorWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}

@Override
public String getPageEncoding() {
return from.getPageEncoding();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import io.jenkins.servlet.ServletInputStreamWrapper;
import io.jenkins.servlet.ServletRequestWrapper;
import io.jenkins.servlet.ServletResponseWrapper;
import jakarta.servlet.ServletConnection;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
Expand Down Expand Up @@ -193,11 +194,6 @@ public jakarta.servlet.RequestDispatcher getRequestDispatcher(String path) {
: null;
}

@Override
public String getRealPath(String path) {
return from.getRealPath(path);
}

@Override
public int getRemotePort() {
return from.getRemotePort();
Expand Down Expand Up @@ -256,6 +252,24 @@ public jakarta.servlet.DispatcherType getDispatcherType() {
return DispatcherTypeWrapper.toJakartaDispatcherType(from.getDispatcherType());
}

@Override
public String getRequestId() {
// TODO implement this

Check warning on line 257 in core/src/main/java/io/jenkins/servlet/http/HttpServletRequestWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}

@Override
public String getProtocolRequestId() {
// TODO implement this

Check warning on line 263 in core/src/main/java/io/jenkins/servlet/http/HttpServletRequestWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}

@Override
public ServletConnection getServletConnection() {
// TODO implement this

Check warning on line 269 in core/src/main/java/io/jenkins/servlet/http/HttpServletRequestWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}

@Override
public String getAuthType() {
return from.getAuthType();
Expand Down Expand Up @@ -400,11 +414,6 @@ public boolean isRequestedSessionIdFromURL() {
return from.isRequestedSessionIdFromURL();
}

@Override
public boolean isRequestedSessionIdFromUrl() {
return from.isRequestedSessionIdFromUrl();
}

@Override
public boolean authenticate(jakarta.servlet.http.HttpServletResponse response)
throws IOException, jakarta.servlet.ServletException {
Expand Down Expand Up @@ -617,7 +626,8 @@ public RequestDispatcher getRequestDispatcher(String path) {

@Override
public String getRealPath(String path) {
return from.getRealPath(path);
// TODO implement this

Check warning on line 629 in core/src/main/java/io/jenkins/servlet/http/HttpServletRequestWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}

@Override
Expand Down Expand Up @@ -823,7 +833,8 @@ public boolean isRequestedSessionIdFromURL() {

@Override
public boolean isRequestedSessionIdFromUrl() {
return from.isRequestedSessionIdFromUrl();
// TODO implement this

Check warning on line 836 in core/src/main/java/io/jenkins/servlet/http/HttpServletRequestWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,6 @@ public String encodeRedirectURL(String url) {
return from.encodeRedirectURL(url);
}

@Override
public String encodeUrl(String url) {
return from.encodeUrl(url);
}

@Override
public String encodeRedirectUrl(String url) {
return from.encodeRedirectUrl(url);
}

@Override
public void sendError(int sc, String msg) throws IOException {
from.sendError(sc, msg);
Expand Down Expand Up @@ -207,11 +197,6 @@ public void setStatus(int sc) {
from.setStatus(sc);
}

@Override
public void setStatus(int sc, String sm) {
from.setStatus(sc, sm);
}

@Override
public int getStatus() {
return from.getStatus();
Expand Down Expand Up @@ -369,12 +354,14 @@ public String encodeRedirectURL(String url) {

@Override
public String encodeUrl(String url) {
return from.encodeUrl(url);
// TODO implement this

Check warning on line 357 in core/src/main/java/io/jenkins/servlet/http/HttpServletResponseWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}

@Override
public String encodeRedirectUrl(String url) {
return from.encodeRedirectUrl(url);
// TODO implement this

Check warning on line 363 in core/src/main/java/io/jenkins/servlet/http/HttpServletResponseWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}

@Override
Expand Down Expand Up @@ -429,7 +416,8 @@ public void setStatus(int sc) {

@Override
public void setStatus(int sc, String sm) {
from.setStatus(sc, sm);
// TODO implement this

Check warning on line 419 in core/src/main/java/io/jenkins/servlet/http/HttpServletResponseWrapper.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: implement this
throw new UnsupportedOperationException();
}

@Override
Expand Down
Loading

0 comments on commit 60a73e2

Please sign in to comment.