Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x

This commit is contained in:
Joakim Erdfelt 2020-06-25 12:52:29 -05:00
commit e1c8a0e8b8
No known key found for this signature in database
GPG Key ID: 2D0E1FB8FE4B68B4
11 changed files with 162 additions and 167 deletions

View File

@ -135,7 +135,7 @@
<!-- ensure we don't have legacy comments that confuse javadoc tooling -->
<module name="Regexp">
<property name="id" value="LegacyMethodSeparators"/>
<property name="format" value="/\*\s*[=*-]*\s*\*/"/>
<property name="format" value="/\*\s*[=*-]+\s*\*/" />
<property name="illegalPattern" value="true"/>
<property name="ignoreComments" value="false"/>
<property name="message" value="Legacy Method Separators"/>

View File

@ -54,23 +54,28 @@ public class TestSecurityAnnotationConversions
{
}
@ServletSecurity(value = @HttpConstraint(value = EmptyRoleSemantic.PERMIT, transportGuarantee = TransportGuarantee.CONFIDENTIAL, rolesAllowed = {
@ServletSecurity(value = @HttpConstraint(value = EmptyRoleSemantic.PERMIT, transportGuarantee = TransportGuarantee.CONFIDENTIAL, rolesAllowed =
{
"tom", "dick", "harry"
}))
public static class RolesServlet extends HttpServlet
{
}
@ServletSecurity(value = @HttpConstraint(value = EmptyRoleSemantic.PERMIT, transportGuarantee = TransportGuarantee.CONFIDENTIAL, rolesAllowed = {
@ServletSecurity(value = @HttpConstraint(value = EmptyRoleSemantic.PERMIT, transportGuarantee = TransportGuarantee.CONFIDENTIAL, rolesAllowed =
{
"tom", "dick", "harry"
}), httpMethodConstraints = {@HttpMethodConstraint(value = "GET")})
public static class Method1Servlet extends HttpServlet
{
}
@ServletSecurity(value = @HttpConstraint(value = EmptyRoleSemantic.PERMIT, transportGuarantee = TransportGuarantee.CONFIDENTIAL, rolesAllowed = {
@ServletSecurity(value = @HttpConstraint(value = EmptyRoleSemantic.PERMIT, transportGuarantee = TransportGuarantee.CONFIDENTIAL, rolesAllowed =
{
"tom", "dick", "harry"
}), httpMethodConstraints = {@HttpMethodConstraint(value = "GET", transportGuarantee = TransportGuarantee.CONFIDENTIAL)})
}), httpMethodConstraints = {
@HttpMethodConstraint(value = "GET", transportGuarantee = TransportGuarantee.CONFIDENTIAL)
})
public static class Method2Servlet extends HttpServlet
{
}

View File

@ -22,7 +22,6 @@ import java.util.List;
import java.util.Locale;
import java.util.concurrent.TimeUnit;
import org.eclipse.jetty.util.Attributes;
import org.eclipse.jetty.util.QuotedStringTokenizer;
import org.eclipse.jetty.util.StringUtil;
import org.slf4j.Logger;

View File

@ -19,7 +19,6 @@
package org.eclipse.jetty.plus.annotation;
import java.lang.reflect.Method;
import javax.servlet.http.HttpServlet;
import org.eclipse.jetty.plus.webapp.PlusDecorator;
@ -55,7 +54,6 @@ public class LifeCycleCallbackCollectionTest
/**
* An unsupported lifecycle callback type
*
*/
public class TestLifeCycleCallback extends LifeCycleCallback
{
@ -79,7 +77,6 @@ public class LifeCycleCallbackCollectionTest
/**
* A class that we can use to simulate having PostConstruct and
* PreDestroy annotations on.
*
*/
public class SomeTestClass
{

View File

@ -21,7 +21,6 @@ package org.eclipse.jetty.server;
import java.net.InetSocketAddress;
import java.util.HashSet;
import java.util.Set;
import javax.servlet.ServletRequest;
import org.eclipse.jetty.io.EndPoint;

View File

@ -495,7 +495,6 @@ public class ServletContextHandlerTest
{
++destroys;
}
}
public static class MySAListener implements HttpSessionAttributeListener
@ -648,7 +647,6 @@ public class ServletContextHandlerTest
{
}
}
@BeforeEach
@ -852,7 +850,9 @@ public class ServletContextHandlerTest
List<String> listenerClassNames = new ArrayList<>();
for (EventListener l : root.getEventListeners())
{
listenerClassNames.add(l.getClass().getName());
}
assertTrue(listenerClassNames.contains("org.eclipse.jetty.servlet.ServletContextHandlerTest$MySCAListener"));
assertTrue(listenerClassNames.contains("org.eclipse.jetty.servlet.ServletContextHandlerTest$MyRequestListener"));
@ -1150,7 +1150,6 @@ public class ServletContextHandlerTest
public void destroy()
{
}
});
context.addFilter(holder, "/*", EnumSet.of(DispatcherType.REQUEST));
context.getServletHandler().setStartWithUnavailable(false);
@ -1202,7 +1201,6 @@ public class ServletContextHandlerTest
public void destroy()
{
}
});
context.addFilter(holder, "/*", EnumSet.of(DispatcherType.REQUEST));
context.getServletHandler().setStartWithUnavailable(false);
@ -1254,7 +1252,6 @@ public class ServletContextHandlerTest
public void destroy()
{
}
});
context.addFilter(holder, "/*", EnumSet.of(DispatcherType.REQUEST));
context.getServletHandler().setStartWithUnavailable(false);
@ -1298,7 +1295,6 @@ public class ServletContextHandlerTest
public void contextDestroyed(ServletContextEvent sce)
{
}
});
_server.setHandler(context);
_server.start();

View File

@ -18,7 +18,7 @@
<jetty.url>http://www.eclipse.org/jetty</jetty.url>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<build-support.version>1.4</build-support.version>
<checkstyle.version>8.20</checkstyle.version>
<checkstyle.version>8.29</checkstyle.version>
<slf4j.version>2.0.0-alpha1</slf4j.version>
<log4j2.version>2.13.0</log4j2.version>
<logback.version>1.3.0-alpha5</logback.version>

View File

@ -130,7 +130,6 @@ public class SessionInvalidationTest
assertThrows(IllegalStateException.class, () -> session.removeValue("foo"));
assertThrows(IllegalStateException.class, () -> session.setAttribute("a", "b"));
assertDoesNotThrow(() -> session.getId());
}
}
}