Backported import and declaration cleanup

This commit is contained in:
Juergen Hoeller
2015-12-18 00:18:09 +01:00
parent d59a97c101
commit 6f2f3595e9
13 changed files with 4 additions and 45 deletions

View File

@@ -24,9 +24,7 @@ import org.aspectj.lang.annotation.SuppressAjWarnings;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.aop.interceptor.AsyncExecutionAspectSupport;
import org.springframework.core.task.AsyncListenableTaskExecutor;
import org.springframework.core.task.AsyncTaskExecutor;
import org.springframework.util.concurrent.ListenableFuture;
/**
* Abstract aspect that routes selected methods asynchronously.

View File

@@ -17,7 +17,6 @@
package org.springframework.beans.factory.support;
import java.lang.reflect.Method;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;

View File

@@ -17,7 +17,6 @@
package org.springframework.format.datetime.standard;
import java.text.ParseException;
import java.time.Instant;
import java.time.Period;
import java.util.Locale;

View File

@@ -101,7 +101,7 @@ final class ObjectToObjectConverter implements ConditionalGenericConverter {
}
}
else if (member instanceof Constructor) {
Constructor<?> ctor = (Constructor) member;
Constructor<?> ctor = (Constructor<?>) member;
return ctor.newInstance(source);
}
}

View File

@@ -277,7 +277,7 @@ public class MappingJackson2MessageConverter extends AbstractMessageConverter {
return extractViewClass((JsonView) conversionHint, conversionHint);
}
else if (conversionHint instanceof Class) {
return (Class) conversionHint;
return (Class<?>) conversionHint;
}
// No JSON view specified...

View File

@@ -17,7 +17,6 @@
package org.springframework.messaging.handler.invocation;
import org.springframework.core.MethodParameter;
import org.springframework.messaging.Message;
import org.springframework.util.concurrent.ListenableFuture;
/**

View File

@@ -18,7 +18,6 @@ package org.springframework.web.util;
import java.io.ByteArrayOutputStream;
import java.io.UnsupportedEncodingException;
import java.util.regex.Pattern;
import org.springframework.util.Assert;
@@ -26,11 +25,11 @@ import org.springframework.util.Assert;
* Utility class for URI encoding and decoding based on RFC 3986.
* Offers encoding methods for the various URI components.
*
* <p>All {@code encode*(String, String} methods in this class operate in a similar way:
* <p>All {@code encode*(String, String)} methods in this class operate in a similar way:
* <ul>
* <li>Valid characters for the specific URI component as defined in RFC 3986 stay the same.</li>
* <li>All other characters are converted into one or more bytes in the given encoding scheme.
* Each of the resulting bytes is written as a hexadecimal string in the "{@code %<i>xy</i>}"
* Each of the resulting bytes is written as a hexadecimal string in the "<code>%<i>xy</i></code>"
* format.</li>
* </ul>
*
@@ -40,32 +39,6 @@ import org.springframework.util.Assert;
*/
public abstract class UriUtils {
private static final String SCHEME_PATTERN = "([^:/?#]+):";
private static final String HTTP_PATTERN = "(http|https):";
private static final String USERINFO_PATTERN = "([^@/]*)";
private static final String HOST_PATTERN = "([^/?#:]*)";
private static final String PORT_PATTERN = "(\\d*)";
private static final String PATH_PATTERN = "([^?#]*)";
private static final String QUERY_PATTERN = "([^#]*)";
private static final String LAST_PATTERN = "(.*)";
// Regex patterns that matches URIs. See RFC 3986, appendix B
private static final Pattern URI_PATTERN = Pattern.compile(
"^(" + SCHEME_PATTERN + ")?" + "(//(" + USERINFO_PATTERN + "@)?" + HOST_PATTERN + "(:" + PORT_PATTERN +
")?" + ")?" + PATH_PATTERN + "(\\?" + QUERY_PATTERN + ")?" + "(#" + LAST_PATTERN + ")?");
private static final Pattern HTTP_URL_PATTERN = Pattern.compile(
"^" + HTTP_PATTERN + "(//(" + USERINFO_PATTERN + "@)?" + HOST_PATTERN + "(:" + PORT_PATTERN + ")?" + ")?" +
PATH_PATTERN + "(\\?" + LAST_PATTERN + ")?");
/**
* Encodes the given URI scheme with the given encoding.
* @param scheme the scheme to be encoded

View File

@@ -146,7 +146,6 @@ public class CommonsPortletMultipartResolver extends CommonsFileUploadSupport
* @return the parsing result
* @throws MultipartException if multipart resolution failed.
*/
@SuppressWarnings("unchecked")
protected MultipartParsingResult parseRequest(ActionRequest request) throws MultipartException {
String encoding = determineEncoding(request);
FileUpload fileUpload = prepareFileUpload(encoding);

View File

@@ -100,7 +100,6 @@ public class ServletWrappingPortletContext implements PortletContext {
}
@Override
@SuppressWarnings("unchecked")
public Set<String> getResourcePaths(String path) {
return this.servletContext.getResourcePaths(path);
}
@@ -116,7 +115,6 @@ public class ServletWrappingPortletContext implements PortletContext {
}
@Override
@SuppressWarnings("unchecked")
public Enumeration<String> getAttributeNames() {
return this.servletContext.getAttributeNames();
}
@@ -127,7 +125,6 @@ public class ServletWrappingPortletContext implements PortletContext {
}
@Override
@SuppressWarnings("unchecked")
public Enumeration<String> getInitParameterNames() {
return this.servletContext.getInitParameterNames();
}

View File

@@ -22,7 +22,6 @@ import org.springframework.core.MethodParameter;
import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.web.context.request.async.WebAsyncUtils;
import org.springframework.web.method.support.AsyncHandlerMethodReturnValueHandler;
import org.springframework.web.method.support.HandlerMethodReturnValueHandler;
import org.springframework.web.method.support.ModelAndViewContainer;
/**

View File

@@ -21,7 +21,6 @@ import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.web.context.request.async.DeferredResult;
import org.springframework.web.context.request.async.WebAsyncUtils;
import org.springframework.web.method.support.AsyncHandlerMethodReturnValueHandler;
import org.springframework.web.method.support.HandlerMethodReturnValueHandler;
import org.springframework.web.method.support.ModelAndViewContainer;
/**

View File

@@ -17,9 +17,7 @@
package org.springframework.web.socket.server.standard;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

View File

@@ -23,7 +23,6 @@ import java.util.regex.Pattern;
import org.springframework.http.MediaType;
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;
import org.springframework.util.Assert;
import org.springframework.util.MultiValueMap;
import org.springframework.util.StringUtils;
import org.springframework.web.socket.WebSocketHandler;