From 4272f6289ae820ecaa9caca4bc02ecf721716647 Mon Sep 17 00:00:00 2001 From: =?utf8?q?L=C3=A9o=20Geoffroy?= <99647462+leo-geoffroy-sonarsource@users.noreply.github.com> Date: Mon, 11 Apr 2022 13:49:16 +0200 Subject: [PATCH] NO-JIRA Upgrade servlet version to 4.x --- build.gradle | 2 +- .../tester/AttributeHolderServletContext.java | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 17b941fc6b6..796efcc5458 100644 --- a/build.gradle +++ b/build.gradle @@ -249,7 +249,7 @@ subprojects { dependency 'com.sun.mail:javax.mail:1.6.2' dependency 'javax.annotation:javax.annotation-api:1.3.2' dependency 'javax.inject:javax.inject:1' - dependency 'javax.servlet:javax.servlet-api:3.1.0' + dependency 'javax.servlet:javax.servlet-api:4.0.1' dependency 'javax.xml.bind:jaxb-api:2.3.1' dependency 'junit:junit:4.13.2' dependency 'org.junit.jupiter:junit-jupiter-api:5.8.2' diff --git a/server/sonar-webserver-auth/src/test/java/org/sonar/server/tester/AttributeHolderServletContext.java b/server/sonar-webserver-auth/src/test/java/org/sonar/server/tester/AttributeHolderServletContext.java index 2a9b356f673..5877f18202b 100644 --- a/server/sonar-webserver-auth/src/test/java/org/sonar/server/tester/AttributeHolderServletContext.java +++ b/server/sonar-webserver-auth/src/test/java/org/sonar/server/tester/AttributeHolderServletContext.java @@ -199,6 +199,11 @@ class AttributeHolderServletContext implements ServletContext { throw new UnsupportedOperationException(); } + @Override + public ServletRegistration.Dynamic addJspFile(String servletName, String jspFile) { + throw new UnsupportedOperationException(); + } + @Override public T createServlet(Class aClass) { throw new UnsupportedOperationException(); @@ -303,4 +308,34 @@ class AttributeHolderServletContext implements ServletContext { public String getVirtualServerName() { throw new UnsupportedOperationException(); } + + @Override + public int getSessionTimeout() { + return 0; + } + + @Override + public void setSessionTimeout(int sessionTimeout) { + throw new UnsupportedOperationException(); + } + + @Override + public String getRequestCharacterEncoding() { + throw new UnsupportedOperationException(); + } + + @Override + public void setRequestCharacterEncoding(String encoding) { + throw new UnsupportedOperationException(); + } + + @Override + public String getResponseCharacterEncoding() { + throw new UnsupportedOperationException(); + } + + @Override + public void setResponseCharacterEncoding(String encoding) { + throw new UnsupportedOperationException(); + } } -- 2.39.5