Removed JDK 1.6 usage

This commit is contained in:
Arjen Poutsma
2010-12-22 10:23:34 +00:00
parent 29a8ca4edc
commit 64c7549c70
5 changed files with 29 additions and 44 deletions

View File

@@ -1,11 +1,11 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -100,7 +100,7 @@ public abstract class AbstractRefreshableWebApplicationContext extends AbstractR
public void setServletContext(ServletContext servletContext) {
this.servletContext = servletContext;
// TODO: SPR-7508 extract createEnvironment() method; do also in GWAC
this.getEnvironment().getPropertySources().push(new ServletContextPropertySource(this.servletContext));
this.getEnvironment().getPropertySources().addFirst(new ServletContextPropertySource(this.servletContext));
}
public ServletContext getServletContext() {
@@ -113,7 +113,7 @@ public abstract class AbstractRefreshableWebApplicationContext extends AbstractR
this.setServletContext(servletConfig.getServletContext());
}
// TODO: SPR-7508 extract createEnvironment() method; do also in GWAC
this.getEnvironment().getPropertySources().push(new ServletConfigPropertySource(servletConfig));
this.getEnvironment().getPropertySources().addFirst(new ServletConfigPropertySource(servletConfig));
}
public ServletConfig getServletConfig() {

View File

@@ -1,11 +1,11 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -160,7 +160,7 @@ public class GenericWebApplicationContext extends GenericApplicationContext
@Override
protected void onRefresh() {
this.themeSource = UiApplicationContextUtils.initThemeSource(this);
this.getEnvironment().getPropertySources().push(new ServletContextPropertySource(servletContext));
this.getEnvironment().getPropertySources().addFirst(new ServletContextPropertySource(servletContext));
}
public Theme getTheme(String themeName) {

View File

@@ -1,11 +1,11 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,7 +17,6 @@
package org.springframework.web.context.support;
import java.util.LinkedList;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
@@ -170,8 +169,8 @@ public class StaticWebApplicationContext extends StaticApplicationContext
protected void onRefresh() {
this.themeSource = UiApplicationContextUtils.initThemeSource(this);
LinkedList<PropertySource<?>> propertySources = this.getEnvironment().getPropertySources();
propertySources.push(new ServletContextPropertySource(servletContext));
propertySources.push(new ServletConfigPropertySource(servletConfig));
propertySources.addFirst(new ServletContextPropertySource(servletContext));
propertySources.addFirst(new ServletConfigPropertySource(servletConfig));
}
public Theme getTheme(String themeName) {