Skip to content

Commit b0f7184

Browse files
committed
Polishing
1 parent 3ae6c0f commit b0f7184

File tree

4 files changed

+18
-19
lines changed

4 files changed

+18
-19
lines changed

spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionAspectSupport.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-2014 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.
@@ -21,7 +21,6 @@
2121
import java.util.concurrent.ConcurrentHashMap;
2222
import java.util.concurrent.Executor;
2323

24-
import org.springframework.beans.BeansException;
2524
import org.springframework.beans.factory.BeanFactory;
2625
import org.springframework.beans.factory.BeanFactoryAware;
2726
import org.springframework.beans.factory.annotation.BeanFactoryAnnotationUtils;
@@ -80,7 +79,7 @@ public void setExecutor(Executor defaultExecutor) {
8079
/**
8180
* Set the {@link BeanFactory} to be used when looking up executors by qualifier.
8281
*/
83-
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
82+
public void setBeanFactory(BeanFactory beanFactory) {
8483
this.beanFactory = beanFactory;
8584
}
8685

spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionInterceptor.java

Lines changed: 6 additions & 6 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-2014 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.
@@ -62,11 +62,11 @@ public class AsyncExecutionInterceptor extends AsyncExecutionAspectSupport
6262

6363
/**
6464
* Create a new {@code AsyncExecutionInterceptor}.
65-
* @param executor the {@link Executor} (typically a Spring {@link AsyncTaskExecutor}
66-
* or {@link java.util.concurrent.ExecutorService}) to delegate to.
65+
* @param defaultExecutor the {@link Executor} (typically a Spring {@link AsyncTaskExecutor}
66+
* or {@link java.util.concurrent.ExecutorService}) to delegate to
6767
*/
68-
public AsyncExecutionInterceptor(Executor executor) {
69-
super(executor);
68+
public AsyncExecutionInterceptor(Executor defaultExecutor) {
69+
super(defaultExecutor);
7070
}
7171

7272

@@ -117,8 +117,8 @@ public Object call() throws Exception {
117117
* Subclasses may override to provide support for extracting qualifier information,
118118
* e.g. via an annotation on the given method.
119119
* @return always {@code null}
120-
* @see #determineAsyncExecutor(Method)
121120
* @since 3.1.2
121+
* @see #determineAsyncExecutor(Method)
122122
*/
123123
@Override
124124
protected String getExecutorQualifier(Method method) {

spring-core/src/main/java/org/springframework/cglib/transform/impl/MemorySafeUndeclaredThrowableStrategy.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
import org.springframework.cglib.transform.TransformingClassGenerator;
2626

2727
/**
28-
* Memory-safe variant of {@link UndeclaredThrowableStrategy} ported from the latest
29-
* as yet unreleased CGLIB code.
28+
* Memory-safe variant of {@link UndeclaredThrowableStrategy} ported from CGLIB 3.1,
29+
* introduced for using it in Spring before it was officially released in CGLIB.
3030
*
3131
* @author Phillip Webb
3232
* @since 3.2.4
@@ -35,23 +35,23 @@ public class MemorySafeUndeclaredThrowableStrategy extends DefaultGeneratorStrat
3535

3636
private static final MethodFilter TRANSFORM_FILTER = new MethodFilter() {
3737
public boolean accept(int access, String name, String desc, String signature, String[] exceptions) {
38-
return !TypeUtils.isPrivate(access) && name.indexOf('$') < 0;
38+
return (!TypeUtils.isPrivate(access) && name.indexOf('$') < 0);
3939
}
4040
};
4141

4242

43-
private Class<?> wrapper;
43+
private final Class<?> wrapper;
4444

4545

46-
public MemorySafeUndeclaredThrowableStrategy(Class wrapper) {
46+
public MemorySafeUndeclaredThrowableStrategy(Class<?> wrapper) {
4747
this.wrapper = wrapper;
4848
}
4949

5050

5151
protected ClassGenerator transform(ClassGenerator cg) throws Exception {
52-
ClassTransformer tr = new UndeclaredThrowableTransformer(wrapper);
53-
tr = new MethodFilterTransformer(TRANSFORM_FILTER, tr);
54-
return new TransformingClassGenerator(cg, tr);
52+
ClassTransformer ct = new UndeclaredThrowableTransformer(this.wrapper);
53+
ct = new MethodFilterTransformer(TRANSFORM_FILTER, ct);
54+
return new TransformingClassGenerator(cg, ct);
5555
}
5656

5757
}

spring-expression/src/main/java/org/springframework/expression/spel/SpelMessage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ public enum SpelMessage {
7474
EXCEPTION_DURING_PROPERTY_WRITE(Kind.ERROR, 1034, "A problem occurred whilst attempting to set the property ''{0}'': {1}"),
7575
NOT_AN_INTEGER(Kind.ERROR, 1035, "The value ''{0}'' cannot be parsed as an int"),
7676
NOT_A_LONG(Kind.ERROR, 1036, "The value ''{0}'' cannot be parsed as a long"),
77-
INVALID_FIRST_OPERAND_FOR_MATCHES_OPERATOR(Kind.ERROR, 1037, "First operand to matches operator must be a string. ''{0}'' is not"),
77+
INVALID_FIRST_OPERAND_FOR_MATCHES_OPERATOR(Kind.ERROR, 1037, "First operand to matches operator must be a string. ''{0}'' is not"),
7878
INVALID_SECOND_OPERAND_FOR_MATCHES_OPERATOR(Kind.ERROR, 1038, "Second operand to matches operator must be a string. ''{0}'' is not"),
7979
FUNCTION_MUST_BE_STATIC(Kind.ERROR, 1039, "Only static methods can be called via function references. The method ''{0}'' referred to by name ''{1}'' is not static."),
8080
NOT_A_REAL(Kind.ERROR, 1040, "The value ''{0}'' cannot be parsed as a double"),
8181
MORE_INPUT(Kind.ERROR,1041, "After parsing a valid expression, there is still more data in the expression: ''{0}''"),
8282
RIGHT_OPERAND_PROBLEM(Kind.ERROR,1042, "Problem parsing right operand"),
83-
NOT_EXPECTED_TOKEN(Kind.ERROR,1043,"Unexpected token. Expected ''{0}'' but was ''{1}''"),
83+
NOT_EXPECTED_TOKEN(Kind.ERROR,1043,"Unexpected token. Expected ''{0}'' but was ''{1}''"),
8484
OOD(Kind.ERROR,1044,"Unexpectedly ran out of input"),
8585
NON_TERMINATING_DOUBLE_QUOTED_STRING(Kind.ERROR,1045,"Cannot find terminating \" for string"),
8686
NON_TERMINATING_QUOTED_STRING(Kind.ERROR,1046,"Cannot find terminating ' for string"),

0 commit comments

Comments
 (0)