Skip to content

Commit dbd82d1

Browse files
committed
Polishing
1 parent e87dc9f commit dbd82d1

4 files changed

Lines changed: 20 additions & 14 deletions

File tree

spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -203,8 +203,7 @@ private PointcutExpression buildPointcutExpression(ClassLoader classLoader) {
203203
pointcutParameters[i] = parser.createPointcutParameter(
204204
this.pointcutParameterNames[i], this.pointcutParameterTypes[i]);
205205
}
206-
return parser.parsePointcutExpression(
207-
replaceBooleanOperators(getExpression()),
206+
return parser.parsePointcutExpression(replaceBooleanOperators(getExpression()),
208207
this.pointcutDeclarationScope, pointcutParameters);
209208
}
210209

spring-context/src/main/java/org/springframework/context/event/GenericApplicationListenerAdapter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public class GenericApplicationListenerAdapter implements GenericApplicationList
3838

3939
private final ResolvableType declaredEventType;
4040

41+
4142
/**
4243
* Create a new GenericApplicationListener for the given delegate.
4344
* @param delegate the delegate listener to be invoked
@@ -87,6 +88,7 @@ public int getOrder() {
8788
return (this.delegate instanceof Ordered ? ((Ordered) this.delegate).getOrder() : Ordered.LOWEST_PRECEDENCE);
8889
}
8990

91+
9092
static ResolvableType resolveDeclaredEventType(Class<?> listenerType) {
9193
ResolvableType resolvableType = ResolvableType.forClass(listenerType).as(ApplicationListener.class);
9294
if (resolvableType == null || !resolvableType.hasGenerics()) {

spring-core/src/test/java/org/springframework/core/GenericTypeResolverTests.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -67,12 +67,12 @@ public void nullIfNotResolvable() {
6767
@Test
6868
public void methodReturnTypes() {
6969
assertEquals(Integer.class,
70-
resolveReturnTypeArgument(findMethod(MyTypeWithMethods.class, "integer"), MyInterfaceType.class));
70+
resolveReturnTypeArgument(findMethod(MyTypeWithMethods.class, "integer"), MyInterfaceType.class));
7171
assertEquals(String.class,
72-
resolveReturnTypeArgument(findMethod(MyTypeWithMethods.class, "string"), MyInterfaceType.class));
72+
resolveReturnTypeArgument(findMethod(MyTypeWithMethods.class, "string"), MyInterfaceType.class));
7373
assertEquals(null, resolveReturnTypeArgument(findMethod(MyTypeWithMethods.class, "raw"), MyInterfaceType.class));
7474
assertEquals(null,
75-
resolveReturnTypeArgument(findMethod(MyTypeWithMethods.class, "object"), MyInterfaceType.class));
75+
resolveReturnTypeArgument(findMethod(MyTypeWithMethods.class, "object"), MyInterfaceType.class));
7676
}
7777

7878
@Test
@@ -81,13 +81,13 @@ public void testResolveType() {
8181
Method intMessageMethod = findMethod(MyTypeWithMethods.class, "readIntegerInputMessage", MyInterfaceType.class);
8282
MethodParameter intMessageMethodParam = new MethodParameter(intMessageMethod, 0);
8383
assertEquals(MyInterfaceType.class,
84-
resolveType(intMessageMethodParam.getGenericParameterType(), new HashMap<TypeVariable, Type>()));
84+
resolveType(intMessageMethodParam.getGenericParameterType(), new HashMap<TypeVariable, Type>()));
8585

8686
Method intArrMessageMethod = findMethod(MyTypeWithMethods.class, "readIntegerArrayInputMessage",
87-
MyInterfaceType[].class);
87+
MyInterfaceType[].class);
8888
MethodParameter intArrMessageMethodParam = new MethodParameter(intArrMessageMethod, 0);
8989
assertEquals(MyInterfaceType[].class,
90-
resolveType(intArrMessageMethodParam.getGenericParameterType(), new HashMap<TypeVariable, Type>()));
90+
resolveType(intArrMessageMethodParam.getGenericParameterType(), new HashMap<TypeVariable, Type>()));
9191

9292
Method genericArrMessageMethod = findMethod(MySimpleTypeWithMethods.class, "readGenericArrayInputMessage",
9393
Object[].class);

spring-webmvc/src/main/java/org/springframework/web/servlet/NoHandlerFoundException.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -13,20 +13,24 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package org.springframework.web.servlet;
1718

1819
import javax.servlet.ServletException;
20+
import javax.servlet.http.HttpServletRequest;
21+
import javax.servlet.http.HttpServletResponse;
1922

2023
import org.springframework.http.HttpHeaders;
2124

2225
/**
2326
* Exception to be thrown if DispatcherServlet is unable to determine a corresponding
24-
* handler for an incoming HTTP request. The DispatcherServlet throws this exception only
25-
* if its throwExceptionIfNoHandlerFound property is set to "true".
27+
* handler for an incoming HTTP request. The DispatcherServlet throws this exception
28+
* only if its "throwExceptionIfNoHandlerFound" property is set to "true".
2629
*
2730
* @author Brian Clozel
2831
* @since 4.0
29-
* @see org.springframework.web.servlet.DispatcherServlet
32+
* @see DispatcherServlet#setThrowExceptionIfNoHandlerFound(boolean)
33+
* @see DispatcherServlet#noHandlerFound(HttpServletRequest, HttpServletResponse)
3034
*/
3135
@SuppressWarnings("serial")
3236
public class NoHandlerFoundException extends ServletException {
@@ -51,6 +55,7 @@ public NoHandlerFoundException(String httpMethod, String requestURL, HttpHeaders
5155
this.headers = headers;
5256
}
5357

58+
5459
public String getHttpMethod() {
5560
return this.httpMethod;
5661
}

0 commit comments

Comments
 (0)