|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2012 the original author or authors. |
| 2 | + * Copyright 2002-2014 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
17 | 17 | package org.springframework.web;
|
18 | 18 |
|
19 | 19 | import java.lang.reflect.Modifier;
|
20 |
| -import java.util.Collections; |
21 | 20 | import java.util.LinkedList;
|
22 | 21 | import java.util.List;
|
23 | 22 | import java.util.ServiceLoader;
|
|
47 | 46 | * Final Draft specification for complete details.
|
48 | 47 | *
|
49 | 48 | * <h3>In combination with {@code web.xml}</h3>
|
50 |
| - * <p>If a web application includes a {@code WEB-INF/web.xml} file, it is important to |
51 |
| - * understand that neither this nor any other {@code ServletContextInitializer} will be |
52 |
| - * processed unless the {@code <web-app>} element's {@code version} attribute is >= "3.0" |
53 |
| - * and the {@code xsi:schemaLocation} for "http://java.sun.com/xml/ns/javaee" is set to |
54 |
| - * "http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd". |
55 |
| - * <p>A web application can choose to limit the amount of classpath scanning the Servlet |
| 49 | + * A web application can choose to limit the amount of classpath scanning the Servlet |
56 | 50 | * container does at startup either through the {@code metadata-complete} attribute in
|
57 | 51 | * {@code web.xml}, which controls scanning for Servlet annotations or through an
|
58 | 52 | * {@code <absolute-ordering>} element also in {@code web.xml}, which controls which
|
@@ -174,7 +168,7 @@ public void onStartup(Set<Class<?>> webAppInitializerClasses, ServletContext ser
|
174 | 168 | return;
|
175 | 169 | }
|
176 | 170 |
|
177 |
| - Collections.sort(initializers, new AnnotationAwareOrderComparator()); |
| 171 | + AnnotationAwareOrderComparator.sort(initializers); |
178 | 172 | servletContext.log("Spring WebApplicationInitializers detected on classpath: " + initializers);
|
179 | 173 |
|
180 | 174 | for (WebApplicationInitializer initializer : initializers) {
|
|
0 commit comments