Convert CRLF (dos) to LF (unix)

Prior to this change, roughly 5% (~300 out of 6000+) of files under the
source tree had CRLF line endings as opposed to the majority which have
LF endings.

This change normalizes these files to LF for consistency going forward.

Command used:

$ git ls-files | xargs file | grep CRLF | cut -d":" -f1 | xargs dos2unix

Issue: SPR-5608
This commit is contained in:
Chris Beams
2011-12-21 14:42:42 +01:00
parent e1b645368a
commit 88913f2b23
293 changed files with 31091 additions and 31091 deletions

View File

@@ -1,8 +1,8 @@
/**
*
* Common MVC logic for matching incoming requests based on conditions.
*
*/
package org.springframework.web.servlet.mvc.condition;
/**
*
* Common MVC logic for matching incoming requests based on conditions.
*
*/
package org.springframework.web.servlet.mvc.condition;

View File

@@ -1,10 +1,10 @@
/**
*
* MVC infrastructure for annotation-based handler method processing,
* building on the <code>org.springframework.web.method.annotation</code> package.
* Entry points are {@link RequestMappingHandlerMapping} and {@link RequestMappingHandlerAdapter}.
*
*/
package org.springframework.web.servlet.mvc.method.annotation;
/**
*
* MVC infrastructure for annotation-based handler method processing,
* building on the <code>org.springframework.web.method.annotation</code> package.
* Entry points are {@link RequestMappingHandlerMapping} and {@link RequestMappingHandlerAdapter}.
*
*/
package org.springframework.web.servlet.mvc.method.annotation;

View File

@@ -1,9 +1,9 @@
/**
*
* Servlet-based infrastructure for handler method processing,
* building on the <code>org.springframework.web.method</code> package.
*
*/
package org.springframework.web.servlet.mvc.method;
/**
*
* Servlet-based infrastructure for handler method processing,
* building on the <code>org.springframework.web.method</code> package.
*
*/
package org.springframework.web.servlet.mvc.method;

View File

@@ -1,112 +1,112 @@
/*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.servlet.view.tiles2;
import java.io.IOException;
import java.net.URL;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import javax.servlet.ServletContext;
import org.apache.tiles.Initializable;
import org.apache.tiles.TilesApplicationContext;
import org.apache.tiles.context.AbstractTilesApplicationContextFactory;
import org.apache.tiles.servlet.context.ServletTilesApplicationContext;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.ResourcePatternResolver;
import org.springframework.web.context.support.ServletContextResourcePatternResolver;
/**
* Spring-specific subclass of the standard Tiles AbstractTilesApplicationContextFactory,
* passing given properties through as Tiles init-param map.
*
* @author Juergen Hoeller
* @since 3.0
* @see TilesConfigurer#setTilesProperties
*/
public class SpringTilesApplicationContextFactory extends AbstractTilesApplicationContextFactory
implements Initializable {
private Map<String, String> params;
public void init(Map<String, String> params) {
this.params = params;
}
public TilesApplicationContext createApplicationContext(Object context) {
return new SpringWildcardServletTilesApplicationContext((ServletContext) context, this.params);
}
/**
* Custom subclass of the standard Tiles WildcardServletTilesApplicationContext,
* passing given properties through as Tiles init-param map.
*/
private static class SpringWildcardServletTilesApplicationContext extends ServletTilesApplicationContext {
private final Map<String, String> mergedInitParams;
private final ResourcePatternResolver resolver;
public SpringWildcardServletTilesApplicationContext(ServletContext servletContext, Map<String, String> params) {
super(servletContext);
this.mergedInitParams = new LinkedHashMap<String, String>();
Enumeration initParamNames = servletContext.getInitParameterNames();
while (initParamNames.hasMoreElements()) {
String initParamName = (String) initParamNames.nextElement();
this.mergedInitParams.put(initParamName, servletContext.getInitParameter(initParamName));
}
if (params != null) {
this.mergedInitParams.putAll(params);
}
this.resolver = new ServletContextResourcePatternResolver(servletContext);
}
@Override
public Map<String, String> getInitParams() {
return this.mergedInitParams;
}
@Override
public URL getResource(String path) throws IOException {
URL retValue = null;
Set<URL> urlSet = getResources(path);
if (urlSet != null && !urlSet.isEmpty()) {
retValue = urlSet.iterator().next();
}
return retValue;
}
@Override
public Set<URL> getResources(String path) throws IOException {
Set<URL> urlSet = null;
Resource[] resources = this.resolver.getResources(path);
if (resources != null && resources.length > 0) {
urlSet = new HashSet<URL>();
for (Resource resource : resources) {
urlSet.add(resource.getURL());
}
}
return urlSet;
}
}
}
/*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.servlet.view.tiles2;
import java.io.IOException;
import java.net.URL;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import javax.servlet.ServletContext;
import org.apache.tiles.Initializable;
import org.apache.tiles.TilesApplicationContext;
import org.apache.tiles.context.AbstractTilesApplicationContextFactory;
import org.apache.tiles.servlet.context.ServletTilesApplicationContext;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.ResourcePatternResolver;
import org.springframework.web.context.support.ServletContextResourcePatternResolver;
/**
* Spring-specific subclass of the standard Tiles AbstractTilesApplicationContextFactory,
* passing given properties through as Tiles init-param map.
*
* @author Juergen Hoeller
* @since 3.0
* @see TilesConfigurer#setTilesProperties
*/
public class SpringTilesApplicationContextFactory extends AbstractTilesApplicationContextFactory
implements Initializable {
private Map<String, String> params;
public void init(Map<String, String> params) {
this.params = params;
}
public TilesApplicationContext createApplicationContext(Object context) {
return new SpringWildcardServletTilesApplicationContext((ServletContext) context, this.params);
}
/**
* Custom subclass of the standard Tiles WildcardServletTilesApplicationContext,
* passing given properties through as Tiles init-param map.
*/
private static class SpringWildcardServletTilesApplicationContext extends ServletTilesApplicationContext {
private final Map<String, String> mergedInitParams;
private final ResourcePatternResolver resolver;
public SpringWildcardServletTilesApplicationContext(ServletContext servletContext, Map<String, String> params) {
super(servletContext);
this.mergedInitParams = new LinkedHashMap<String, String>();
Enumeration initParamNames = servletContext.getInitParameterNames();
while (initParamNames.hasMoreElements()) {
String initParamName = (String) initParamNames.nextElement();
this.mergedInitParams.put(initParamName, servletContext.getInitParameter(initParamName));
}
if (params != null) {
this.mergedInitParams.putAll(params);
}
this.resolver = new ServletContextResourcePatternResolver(servletContext);
}
@Override
public Map<String, String> getInitParams() {
return this.mergedInitParams;
}
@Override
public URL getResource(String path) throws IOException {
URL retValue = null;
Set<URL> urlSet = getResources(path);
if (urlSet != null && !urlSet.isEmpty()) {
retValue = urlSet.iterator().next();
}
return retValue;
}
@Override
public Set<URL> getResources(String path) throws IOException {
Set<URL> urlSet = null;
Resource[] resources = this.resolver.getResources(path);
if (resources != null && resources.length > 0) {
urlSet = new HashSet<URL>();
for (Resource resource : resources) {
urlSet.add(resource.getURL());
}
}
return urlSet;
}
}
}