Skip to content

Commit 9f4968e

Browse files
committed
Polishing
1 parent b6cfa2d commit 9f4968e

File tree

4 files changed

+18
-24
lines changed

4 files changed

+18
-24
lines changed

spring-aop/src/main/java/org/springframework/aop/framework/Advised.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2024 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.
@@ -56,9 +56,9 @@ public interface Advised extends TargetClassAware {
5656

5757
/**
5858
* Determine whether the given interface is proxied.
59-
* @param intf the interface to check
59+
* @param ifc the interface to check
6060
*/
61-
boolean isInterfaceProxied(Class<?> intf);
61+
boolean isInterfaceProxied(Class<?> ifc);
6262

6363
/**
6464
* Change the {@code TargetSource} used by this {@code Advised} object.

spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java

+12-12
Original file line numberDiff line numberDiff line change
@@ -222,28 +222,28 @@ public void setInterfaces(Class<?>... interfaces) {
222222

223223
/**
224224
* Add a new proxied interface.
225-
* @param intf the additional interface to proxy
225+
* @param ifc the additional interface to proxy
226226
*/
227-
public void addInterface(Class<?> intf) {
228-
Assert.notNull(intf, "Interface must not be null");
229-
if (!intf.isInterface()) {
230-
throw new IllegalArgumentException("[" + intf.getName() + "] is not an interface");
227+
public void addInterface(Class<?> ifc) {
228+
Assert.notNull(ifc, "Interface must not be null");
229+
if (!ifc.isInterface()) {
230+
throw new IllegalArgumentException("[" + ifc.getName() + "] is not an interface");
231231
}
232-
if (!this.interfaces.contains(intf)) {
233-
this.interfaces.add(intf);
232+
if (!this.interfaces.contains(ifc)) {
233+
this.interfaces.add(ifc);
234234
adviceChanged();
235235
}
236236
}
237237

238238
/**
239239
* Remove a proxied interface.
240240
* <p>Does nothing if the given interface isn't proxied.
241-
* @param intf the interface to remove from the proxy
241+
* @param ifc the interface to remove from the proxy
242242
* @return {@code true} if the interface was removed; {@code false}
243243
* if the interface was not found and hence could not be removed
244244
*/
245-
public boolean removeInterface(Class<?> intf) {
246-
return this.interfaces.remove(intf);
245+
public boolean removeInterface(Class<?> ifc) {
246+
return this.interfaces.remove(ifc);
247247
}
248248

249249
@Override
@@ -252,9 +252,9 @@ public Class<?>[] getProxiedInterfaces() {
252252
}
253253

254254
@Override
255-
public boolean isInterfaceProxied(Class<?> intf) {
255+
public boolean isInterfaceProxied(Class<?> ifc) {
256256
for (Class<?> proxyIntf : this.interfaces) {
257-
if (intf.isAssignableFrom(proxyIntf)) {
257+
if (ifc.isAssignableFrom(proxyIntf)) {
258258
return true;
259259
}
260260
}

spring-context/src/main/java/org/springframework/context/aot/AbstractAotProcessor.java

+2-7
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@
4747
public abstract class AbstractAotProcessor<T> {
4848

4949
/**
50-
* The name of a system property that is made available when the processor
51-
* runs.
50+
* The name of a system property that is made available when the processor runs.
5251
* @see #doProcess()
5352
*/
5453
private static final String AOT_PROCESSING = "spring.aot.processing";
@@ -125,6 +124,7 @@ protected void writeHints(RuntimeHints hints) {
125124
writer.write(hints);
126125
}
127126

127+
128128
/**
129129
* Common settings for AOT processors.
130130
*/
@@ -140,7 +140,6 @@ public static final class Settings {
140140

141141
private final String artifactId;
142142

143-
144143
private Settings(Path sourceOutput, Path resourceOutput, Path classOutput, String groupId, String artifactId) {
145144
this.sourceOutput = sourceOutput;
146145
this.resourceOutput = resourceOutput;
@@ -149,15 +148,13 @@ private Settings(Path sourceOutput, Path resourceOutput, Path classOutput, Strin
149148
this.artifactId = artifactId;
150149
}
151150

152-
153151
/**
154152
* Create a new {@link Builder} for {@link Settings}.
155153
*/
156154
public static Builder builder() {
157155
return new Builder();
158156
}
159157

160-
161158
/**
162159
* Get the output directory for generated sources.
163160
*/
@@ -214,12 +211,10 @@ public static final class Builder {
214211
@Nullable
215212
private String artifactId;
216213

217-
218214
private Builder() {
219215
// internal constructor
220216
}
221217

222-
223218
/**
224219
* Set the output directory for generated sources.
225220
* @param sourceOutput the location of generated sources

spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-common-interceptors.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</description>
1212

1313
<bean id="aapc" class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator">
14-
<!-- This common interceptor will be applied always, before custom lockable advisor -->
14+
<!-- This common interceptor will be applied before the custom lockable advisor -->
1515
<property name="interceptorNames">
1616
<value>nopInterceptor</value>
1717
</property>
@@ -44,4 +44,3 @@
4444
<bean id="packageVisibleMethod" class="org.springframework.aop.framework.autoproxy.PackageVisibleMethod"/>
4545

4646
</beans>
47-

0 commit comments

Comments
 (0)