From 47395f6b0a3e703805e09702ca832abf77b72c65 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 28 Jan 2014 17:32:08 +0100 Subject: [PATCH] Dropped explicit paragraph on web.xml version declaration Issue: SPR-11364 (cherry picked from commit 36ab65a) --- .../web/SpringServletContainerInitializer.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/spring-web/src/main/java/org/springframework/web/SpringServletContainerInitializer.java b/spring-web/src/main/java/org/springframework/web/SpringServletContainerInitializer.java index 717f4ec3f9..7b4124263b 100644 --- a/spring-web/src/main/java/org/springframework/web/SpringServletContainerInitializer.java +++ b/spring-web/src/main/java/org/springframework/web/SpringServletContainerInitializer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,6 @@ package org.springframework.web; import java.lang.reflect.Modifier; -import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.ServiceLoader; @@ -47,12 +46,7 @@ import org.springframework.core.annotation.AnnotationAwareOrderComparator; * Final Draft specification for complete details. * *

In combination with {@code web.xml}

- *

If a web application includes a {@code WEB-INF/web.xml} file, it is important to - * understand that neither this nor any other {@code ServletContextInitializer} will be - * processed unless the {@code } element's {@code version} attribute is >= "3.0" - * and the {@code xsi:schemaLocation} for "http://java.sun.com/xml/ns/javaee" is set to - * "http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd". - *

A web application can choose to limit the amount of classpath scanning the Servlet + * A web application can choose to limit the amount of classpath scanning the Servlet * container does at startup either through the {@code metadata-complete} attribute in * {@code web.xml}, which controls scanning for Servlet annotations or through an * {@code } element also in {@code web.xml}, which controls which @@ -174,7 +168,7 @@ public class SpringServletContainerInitializer implements ServletContainerInitia return; } - Collections.sort(initializers, new AnnotationAwareOrderComparator()); + AnnotationAwareOrderComparator.sort(initializers); servletContext.log("Spring WebApplicationInitializers detected on classpath: " + initializers); for (WebApplicationInitializer initializer : initializers) {