Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
This commit is contained in:
commit
e1c8a0e8b8
|
@ -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"/>
|
||||
|
|
|
@ -54,23 +54,28 @@ public class TestSecurityAnnotationConversions
|
|||
{
|
||||
}
|
||||
|
||||
@ServletSecurity(value = @HttpConstraint(value = EmptyRoleSemantic.PERMIT, transportGuarantee = TransportGuarantee.CONFIDENTIAL, rolesAllowed = {
|
||||
"tom", "dick", "harry"
|
||||
}))
|
||||
@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 = {
|
||||
"tom", "dick", "harry"
|
||||
}), httpMethodConstraints = {@HttpMethodConstraint(value = "GET")})
|
||||
@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 = {
|
||||
"tom", "dick", "harry"
|
||||
}), httpMethodConstraints = {@HttpMethodConstraint(value = "GET", transportGuarantee = TransportGuarantee.CONFIDENTIAL)})
|
||||
@ServletSecurity(value = @HttpConstraint(value = EmptyRoleSemantic.PERMIT, transportGuarantee = TransportGuarantee.CONFIDENTIAL, rolesAllowed =
|
||||
{
|
||||
"tom", "dick", "harry"
|
||||
}), httpMethodConstraints = {
|
||||
@HttpMethodConstraint(value = "GET", transportGuarantee = TransportGuarantee.CONFIDENTIAL)
|
||||
})
|
||||
public static class Method2Servlet extends HttpServlet
|
||||
{
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
@ -37,11 +36,11 @@ public class HttpCookie
|
|||
private static final String __01Jan1970_COOKIE = DateGenerator.formatCookieDate(0).trim();
|
||||
|
||||
/**
|
||||
*If this string is found within the comment parsed with {@link #isHttpOnlyInComment(String)} the check will return true
|
||||
* If this string is found within the comment parsed with {@link #isHttpOnlyInComment(String)} the check will return true
|
||||
**/
|
||||
public static final String HTTP_ONLY_COMMENT = "__HTTP_ONLY__";
|
||||
/**
|
||||
*These strings are used by {@link #getSameSiteFromComment(String)} to check for a SameSite specifier in the comment
|
||||
* These strings are used by {@link #getSameSiteFromComment(String)} to check for a SameSite specifier in the comment
|
||||
**/
|
||||
private static final String SAME_SITE_COMMENT = "__SAME_SITE_";
|
||||
public static final String SAME_SITE_NONE_COMMENT = SAME_SITE_COMMENT + "NONE__";
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1225,7 +1225,7 @@ public class ResponseTest
|
|||
|
||||
response.setContentType("some/type");
|
||||
response.setContentLength(3);
|
||||
response.setHeader(HttpHeader.EXPIRES,"never");
|
||||
response.setHeader(HttpHeader.EXPIRES, "never");
|
||||
|
||||
response.setHeader("SomeHeader", "SomeValue");
|
||||
|
||||
|
@ -1400,7 +1400,7 @@ public class ResponseTest
|
|||
@Override
|
||||
public void setAttribute(String name, Object object)
|
||||
{
|
||||
_attributes.put(name,object);
|
||||
_attributes.put(name, object);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -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"));
|
||||
|
@ -1018,7 +1018,7 @@ public class ServletContextHandlerTest
|
|||
assertTrue(e.getCause() instanceof IllegalStateException);
|
||||
}
|
||||
else
|
||||
fail(e);
|
||||
fail(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
@ -1701,7 +1697,7 @@ public class ServletContextHandlerTest
|
|||
@Override
|
||||
protected boolean checkWebResourcePermissions(String pathInContext, Request request, Response response,
|
||||
Object constraintInfo, UserIdentity userIdentity)
|
||||
throws IOException
|
||||
throws IOException
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -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>
|
||||
|
|
|
@ -130,7 +130,6 @@ public class SessionInvalidationTest
|
|||
assertThrows(IllegalStateException.class, () -> session.removeValue("foo"));
|
||||
assertThrows(IllegalStateException.class, () -> session.setAttribute("a", "b"));
|
||||
assertDoesNotThrow(() -> session.getId());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue