Skip to content

Commit

Permalink
Update Jetty to 12
Browse files Browse the repository at this point in the history
  • Loading branch information
wkurniawan07 committed Apr 6, 2024
1 parent 4fa0dc5 commit eee2e3a
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 58 deletions.
13 changes: 9 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,17 @@ dependencies {
implementation("com.sun.jersey:jersey-client:1.19.4")
implementation("com.sun.jersey:jersey-core:1.19.4")
implementation("com.sun.jersey.contribs:jersey-multipart:1.19.4")
implementation("org.apache.solr:solr-solrj:8.11.3")
implementation(platform("org.eclipse.jetty:jetty-bom:11.0.20"))
implementation("org.apache.solr:solr-solrj:8.11.3") {
exclude group: "org.eclipse.jetty.http2", module: "http2-client"
exclude group: "org.eclipse.jetty.http2", module: "http2-common"
exclude group: "org.eclipse.jetty.http2", module: "http2-hpack"
exclude group: "org.eclipse.jetty.http2", module: "http2-http-client-transport"
}
implementation(platform("org.eclipse.jetty:jetty-bom:12.0.8"))
implementation("org.eclipse.jetty:jetty-slf4j-impl")
implementation("org.eclipse.jetty:jetty-server")
implementation("org.eclipse.jetty:jetty-webapp")
implementation("org.eclipse.jetty:jetty-annotations")
implementation("org.eclipse.jetty.ee10:jetty-ee10-webapp:12.0.8")
implementation("org.eclipse.jetty.ee10:jetty-ee10-annotations:12.0.8")
implementation("org.jsoup:jsoup:1.17.2")
implementation("org.hibernate.orm:hibernate-core:6.4.4.Final")
implementation("org.postgresql:postgresql:42.7.3")
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/teammates/main/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import java.io.File;
import java.time.zone.ZoneRulesProvider;

import org.eclipse.jetty.ee10.servlet.ServletHolder;
import org.eclipse.jetty.ee10.webapp.WebAppContext;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.util.component.LifeCycle;
import org.eclipse.jetty.webapp.WebAppContext;

import teammates.common.util.Config;
import teammates.common.util.Logger;
Expand Down
1 change: 0 additions & 1 deletion src/test/java/teammates/architecture/ArchitectureTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ public void testArchitecture_externalApi_objectifyApiCanOnlyBeAccessedBySomePack
.and().resideOutsideOfPackage(includeSubpackages(CLIENT_SCRIPTS_PACKAGE))
.and().doNotHaveSimpleName("BaseTestCaseWithSqlDatabaseAccess")
.and().doNotHaveSimpleName("BaseTestCaseWithLocalDatabaseAccess")
.and().doNotHaveSimpleName("ObjectifyFilter")
.should().accessClassesThat().resideInAPackage("com.googlecode.objectify..")
.check(ALL_CLASSES);
}
Expand Down
52 changes: 16 additions & 36 deletions src/test/java/teammates/test/MockHttpServletRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import jakarta.servlet.AsyncContext;
import jakarta.servlet.DispatcherType;
import jakarta.servlet.RequestDispatcher;
import jakarta.servlet.ServletConnection;
import jakarta.servlet.ServletContext;
import jakarta.servlet.ServletInputStream;
import jakarta.servlet.ServletRequest;
Expand All @@ -24,7 +25,6 @@
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpSession;
import jakarta.servlet.http.HttpSessionContext;
import jakarta.servlet.http.HttpUpgradeHandler;
import jakarta.servlet.http.Part;

Expand Down Expand Up @@ -209,51 +209,26 @@ public int getMaxInactiveInterval() {
return 0;
}

@Override
public HttpSessionContext getSessionContext() {
return null;
}

@Override
public Object getAttribute(String name) {
return null;
}

@Override
public Object getValue(String name) {
return null;
}

@Override
public Enumeration<String> getAttributeNames() {
return null;
}

@Override
public String[] getValueNames() {
return new String[0];
}

@Override
public void setAttribute(String name, Object value) {
// not used
}

@Override
public void putValue(String name, Object value) {
// not used
}

@Override
public void removeAttribute(String name) {
// not used
}

@Override
public void removeValue(String name) {
// not used
}

@Override
public void invalidate() {
// not used
Expand Down Expand Up @@ -286,11 +261,6 @@ public boolean isRequestedSessionIdFromURL() {
return false;
}

@Override
public boolean isRequestedSessionIdFromUrl() {
return false;
}

@Override
public boolean authenticate(HttpServletResponse httpServletResponse) {
return false;
Expand Down Expand Up @@ -478,11 +448,6 @@ public void include(ServletRequest request, ServletResponse response) {
};
}

@Override
public String getRealPath(String s) {
return null;
}

@Override
public int getRemotePort() {
return 0;
Expand Down Expand Up @@ -538,4 +503,19 @@ public DispatcherType getDispatcherType() {
return null;
}

@Override
public String getRequestId() {
return null;
}

@Override
public String getProtocolRequestId() {
return null;
}

@Override
public ServletConnection getServletConnection() {
return null;
}

}
15 changes: 0 additions & 15 deletions src/test/java/teammates/test/MockHttpServletResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,6 @@ public String encodeRedirectURL(String url) {
return null;
}

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

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

@Override
public void sendError(int sc, String msg) {
// not used
Expand Down Expand Up @@ -110,11 +100,6 @@ public void setStatus(int sc) {
this.statusCode = sc;
}

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

@Override
public int getStatus() {
return this.statusCode;
Expand Down

0 comments on commit eee2e3a

Please sign in to comment.