Remove trailing whitespace in source files

find . -type f -name "*.java" -or -name "*.aj" | \
    xargs perl -p -i -e "s/[ \t]*$//g" {} \;

Issue: SPR-10127
This commit is contained in:
Phillip Webb
2012-12-18 13:45:00 -08:00
committed by Chris Beams
parent 44a474a014
commit 1762157ad1
1400 changed files with 5920 additions and 5923 deletions

View File

@@ -25,7 +25,7 @@ package org.springframework.core;
* @see org.springframework.core.Constants
*/
public class ConstantException extends IllegalArgumentException {
/**
* Thrown when an invalid constant name is requested.
* @param className name of the class containing the constant definitions

View File

@@ -207,7 +207,7 @@ public class Constants {
* in accordance with the standard Java convention for constant
* values (i.e. all uppercase). The supplied <code>namePrefix</code>
* will be uppercased (in a locale-insensitive fashion) prior to
* the main logic of this method kicking in.
* the main logic of this method kicking in.
* @param namePrefix prefix of the constant names to search (may be <code>null</code>)
* @return the set of values
*/

View File

@@ -1,12 +1,12 @@
/*
* Copyright 2002-2005 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.

View File

@@ -1,12 +1,12 @@
/*
* Copyright 2002-2005 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.
@@ -27,9 +27,9 @@ package org.springframework.core;
* @see org.springframework.context.MessageSource
*/
public interface ErrorCoded {
/**
* Return the error code associated with this failure.
* Return the error code associated with this failure.
* The GUI can render this any way it pleases, allowing for localization etc.
* @return a String error code associated with this failure,
* or <code>null</code> if not error-coded

View File

@@ -32,7 +32,7 @@ import java.lang.reflect.Method;
* @since 2.0
*/
public interface ParameterNameDiscoverer {
/**
* Return parameter names for this method,
* or <code>null</code> if they cannot be determined.
@@ -41,7 +41,7 @@ public interface ParameterNameDiscoverer {
* or <code>null</code> if they cannot
*/
String[] getParameterNames(Method method);
/**
* Return parameter names for this constructor,
* or <code>null</code> if they cannot be determined.

View File

@@ -35,7 +35,7 @@ import java.util.List;
* @since 2.0
*/
public class PrioritizedParameterNameDiscoverer implements ParameterNameDiscoverer {
private final List<ParameterNameDiscoverer> parameterNameDiscoverers =
new LinkedList<ParameterNameDiscoverer>();

View File

@@ -48,6 +48,6 @@ public abstract class AbstractGenericLabeledEnum extends AbstractLabeledEnum {
else {
return getCode().toString();
}
}
}
}

View File

@@ -50,7 +50,7 @@ public class LetterCodedLabeledEnum extends AbstractGenericLabeledEnum {
this.code = new Character(code);
}
public Comparable getCode() {
return code;
}

View File

@@ -46,7 +46,7 @@ public class ShortCodedLabeledEnum extends AbstractGenericLabeledEnum {
this.code = new Short((short) code);
}
public Comparable getCode() {
return code;
}

View File

@@ -18,9 +18,9 @@ package org.springframework.core.enums;
/**
* Base class for static type-safe labeled enum instances.
*
*
* Usage example:
*
*
* <pre>
* public class FlowSessionStatus extends StaticLabeledEnum {
*
@@ -30,15 +30,15 @@ package org.springframework.core.enums;
* public static FlowSessionStatus PAUSED = new FlowSessionStatus(2, &quot;Paused&quot;);
* public static FlowSessionStatus SUSPENDED = new FlowSessionStatus(3, &quot;Suspended&quot;);
* public static FlowSessionStatus ENDED = new FlowSessionStatus(4, &quot;Ended&quot;);
*
*
* // private constructor!
* private FlowSessionStatus(int code, String label) {
* super(code, label);
* }
*
*
* // custom behavior
* }</pre>
*
*
* @author Keith Donald
* @since 1.2.6
* @deprecated as of Spring 3.0, in favor of Java 5 enums.

View File

@@ -18,7 +18,7 @@ package org.springframework.core.env;
/**
* Interface indicating a component contains and makes available an {@link Environment} object.
* Interface indicating a component contains and makes available an {@link Environment} object.
*
* <p>All Spring application contexts are EnvironmentCapable, and the interface is used primarily
* for performing {@code instanceof} checks in framework methods that accept BeanFactory

View File

@@ -1,12 +1,12 @@
/*
* Copyright 2002-2012 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.
@@ -29,7 +29,7 @@ import java.io.InputStream;
* file-based <code>Resource</code> implementation can be used as a concrete
* instance, allowing one to read the underlying content stream multiple times.
* This makes this interface useful as an abstract content source for mail
* attachments, for example.
* attachments, for example.
*
* @author Juergen Hoeller
* @since 20.01.2004

View File

@@ -66,7 +66,7 @@ import org.springframework.util.StringUtils;
* Examples are real URLs such as "<code>file:C:/context.xml</code>", pseudo-URLs
* such as "<code>classpath:/context.xml</code>", and simple unprefixed paths
* such as "<code>/WEB-INF/context.xml</code>". The latter will resolve in a
* fashion specific to the underlying <code>ResourceLoader</code> (e.g.
* fashion specific to the underlying <code>ResourceLoader</code> (e.g.
* <code>ServletContextResource</code> for a <code>WebApplicationContext</code>).
*
* <p><b>Ant-style Patterns:</b>
@@ -147,7 +147,7 @@ import org.springframework.util.StringUtils;
* com/mycompany/package1/service-context.xml
* </pre>may be in only one location, but when a path such as<pre>
* classpath:com/mycompany/**&#47;service-context.xml
* </pre>is used to try to resolve it, the resolver will work off the (first) URL
* </pre>is used to try to resolve it, the resolver will work off the (first) URL
* returned by <code>getResource("com/mycompany");</code>. If this base package
* node exists in multiple classloader locations, the actual end resource may
* not be underneath. Therefore, preferably, use "<code>classpath*:<code>" with the same
@@ -695,7 +695,7 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
else if ("toString".equals(methodName)) {
return toString();
}
throw new IllegalStateException("Unexpected method invocation: " + method);
}

View File

@@ -24,12 +24,12 @@ import org.springframework.core.NestedIOException;
/**
* Deserializer that reads an input stream using Java Serialization.
*
*
* @author Gary Russell
* @author Mark Fisher
* @since 3.0.5
*/
public class DefaultDeserializer implements Deserializer<Object> {
public class DefaultDeserializer implements Deserializer<Object> {
/**
* Reads the input stream and deserializes into an object.

View File

@@ -23,7 +23,7 @@ import java.io.Serializable;
/**
* Serializer that writes an object to an output stream using Java Serialization.
*
*
* @author Gary Russell
* @author Mark Fisher
* @since 3.0.5

View File

@@ -21,7 +21,7 @@ import java.io.InputStream;
/**
* A strategy interface for converting from data in an InputStream to an Object.
*
*
* @author Gary Russell
* @author Mark Fisher
* @since 3.0.5

View File

@@ -21,7 +21,7 @@ import java.io.OutputStream;
/**
* A strategy interface for streaming an object to an OutputStream.
*
*
* @author Gary Russell
* @author Mark Fisher
* @since 3.0.5

View File

@@ -1,7 +1,7 @@
/**
*
* Root package for Spring's serializer interfaces and implementations.
* Root package for Spring's serializer interfaces and implementations.
* Provides an abstraction over various serialization techniques.
* Includes exceptions for serialization and deserialization failures.
*

View File

@@ -17,7 +17,7 @@
package org.springframework.core.style;
/**
* Simple utility class to allow for convenient access to value
* Simple utility class to allow for convenient access to value
* styling logic, mainly to support descriptive logging messages.
*
* <p>For more sophisticated needs, use the {@link ValueStyler} abstraction
@@ -30,7 +30,7 @@ package org.springframework.core.style;
* @see DefaultValueStyler
*/
public abstract class StylerUtils {
/**
* Default ValueStyler instance used by the <code>style</code> method.
* Also available for the {@link ToStringCreator} class in this package.

View File

@@ -22,7 +22,7 @@ import org.springframework.util.Assert;
* Utility class that builds pretty-printing <code>toString()</code> methods
* with pluggable styling conventions. By default, ToStringCreator adheres
* to Spring's <code>toString()</code> styling conventions.
*
*
* @author Keith Donald
* @author Juergen Hoeller
* @since 1.2.2

View File

@@ -41,7 +41,7 @@ public class SyncTaskExecutor implements TaskExecutor, Serializable {
/**
* Executes the given <code>task</code> synchronously, through direct
* invocation of it's {@link Runnable#run() run()} method.
* @throws IllegalArgumentException if the given <code>task</code> is <code>null</code>
* @throws IllegalArgumentException if the given <code>task</code> is <code>null</code>
*/
public void execute(Runnable task) {
Assert.notNull(task, "Runnable must not be null");

View File

@@ -21,7 +21,7 @@ import java.util.concurrent.Executor;
/**
* Simple task executor interface that abstracts the execution
* of a {@link Runnable}.
*
*
* <p>Implementations can use all sorts of different execution strategies,
* such as: synchronous, asynchronous, using a thread pool, and more.
*

View File

@@ -67,11 +67,11 @@ public class StandardMethodMetadata implements MethodMetadata {
return this.introspectedMethod;
}
public String getMethodName() {
return this.introspectedMethod.getName();
}
public String getDeclaringClassName() {
return this.introspectedMethod.getDeclaringClass().getName();
}

View File

@@ -1,8 +1,8 @@
/**
*
*
* Support classes for reading annotation and class-level metadata.
*
*
*/
package org.springframework.core.type.classreading;

View File

@@ -24,12 +24,12 @@ import org.springframework.core.type.classreading.MetadataReader;
/**
* Type filter that is aware of traversing over hierarchy.
*
*
* <p>This filter is useful when matching needs to be made based on potentially the
* whole class/interface hierarchy. The algorithm employed uses a succeed-fast
* strategy: if at any time a match is declared, no further processing is
* carried out.
*
*
* @author Ramnivas Laddad
* @author Mark Fisher
* @since 2.5

View File

@@ -78,7 +78,7 @@ public class AnnotationTypeFilter extends AbstractTypeHierarchyTraversingFilter
@Override
protected boolean matchSelf(MetadataReader metadataReader) {
AnnotationMetadata metadata = metadataReader.getAnnotationMetadata();
return metadata.hasAnnotation(this.annotationType.getName()) ||
return metadata.hasAnnotation(this.annotationType.getName()) ||
(this.considerMetaAnnotations && metadata.hasMetaAnnotation(this.annotationType.getName()));
}

View File

@@ -1,12 +1,12 @@
/*
* Copyright 2002-2007 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.

View File

@@ -37,7 +37,7 @@ import java.util.WeakHashMap;
* <p>This class is an abstract template. Caching Map implementations
* should subclass and override the <code>create(key)</code> method which
* encapsulates expensive creation of a new object.
*
*
* @author Keith Donald
* @author Juergen Hoeller
* @since 1.2.2

View File

@@ -54,7 +54,7 @@ public abstract class ConcurrencyThrottleSupport implements Serializable {
* Switch concurrency 'off': that is, don't allow any concurrent invocations.
*/
public static final int NO_CONCURRENCY = 0;
/** Transient to optimize serialization */
protected transient Log logger = LogFactory.getLog(getClass());
@@ -99,7 +99,7 @@ public abstract class ConcurrencyThrottleSupport implements Serializable {
/**
* To be invoked before the main execution logic of concrete subclasses.
* <p>This implementation applies the concurrency throttle.
* @see #afterAccess()
* @see #afterAccess()
*/
protected void beforeAccess() {
if (this.concurrencyLimit == NO_CONCURRENCY) {

View File

@@ -67,7 +67,7 @@ public abstract class DigestUtils {
}
/**
* Creates a new {@link MessageDigest} with the given algorithm. Necessary
* Creates a new {@link MessageDigest} with the given algorithm. Necessary
* because {@code MessageDigest} is not thread-safe.
*/
private static MessageDigest getDigest(String algorithm) {

View File

@@ -1,12 +1,12 @@
/*
* Copyright 2002-2005 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.

View File

@@ -22,7 +22,7 @@ import org.springframework.util.PropertyPlaceholderHelper.PlaceholderResolver;
* Helper class for resolving placeholders in texts. Usually applied to file paths.
*
* <p>A text may contain <code>${...}</code> placeholders, to be resolved as system properties: e.g.
* <code>${user.dir}</code>. Default values can be supplied using the ":" separator between key
* <code>${user.dir}</code>. Default values can be supplied using the ":" separator between key
* and value.
*
* @author Juergen Hoeller

View File

@@ -212,7 +212,7 @@ public abstract class TypeUtils {
return true;
}
public static boolean isAssignableBound(Type lhsType, Type rhsType) {
if (rhsType == null) {
return true;

View File

@@ -22,7 +22,7 @@ import java.util.Comparator;
* Comparator that adapts Comparables to the Comparator interface.
* Mainly for internal use in other Comparators, when supposed
* to work on Comparables.
*
*
* @author Keith Donald
* @since 1.2.2
* @see Comparable

View File

@@ -32,7 +32,7 @@ import org.springframework.util.Assert;
*
* <p>This facilitates in-memory sorting similar to multi-column sorting in SQL.
* The order of any single Comparator in the list can also be reversed.
*
*
* @author Keith Donald
* @author Juergen Hoeller
* @since 1.2.2

View File

@@ -119,7 +119,7 @@ public abstract class DomUtils {
}
/**
* Retrieve all child elements of the given DOM element
* Retrieve all child elements of the given DOM element
* @param ele the DOM element to analyze
* @return a List of child <code>org.w3c.dom.Element</code> instances

View File

@@ -36,7 +36,7 @@ import org.springframework.util.Assert;
*
* @author Arjen Poutsma
* @since 3.0.5
* @see StaxUtils#createEventStreamWriter(javax.xml.stream.XMLEventWriter, javax.xml.stream.XMLEventFactory)
* @see StaxUtils#createEventStreamWriter(javax.xml.stream.XMLEventWriter, javax.xml.stream.XMLEventFactory)
*/
class XMLEventStreamWriter implements XMLStreamWriter {
@@ -51,7 +51,7 @@ class XMLEventStreamWriter implements XMLStreamWriter {
public XMLEventStreamWriter(XMLEventWriter eventWriter, XMLEventFactory eventFactory) {
Assert.notNull(eventWriter, "'eventWriter' must not be null");
Assert.notNull(eventFactory, "'eventFactory' must not be null");
this.eventWriter = eventWriter;
this.eventFactory = eventFactory;
}