Skip to content

Commit 1c83b3f

Browse files
Jay Bryantsbrannen
authored andcommitted
Wording changes
Replace potentially insensitive language with more neutral language. Closes gh-25314
1 parent 913eca9 commit 1c83b3f

14 files changed

+253
-253
lines changed

src/docs/asciidoc/core/core-aop-api.adoc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ proxy is created to avoid the need for a test on every method invocation. If the
106106
two-argument `matches` method returns `true` for a given method, and the `isRuntime()` method
107107
for the MethodMatcher returns `true`, the three-argument matches method is invoked on
108108
every method invocation. This lets a pointcut look at the arguments passed to the
109-
method invocation immediately before the target advice is to execute.
109+
method invocation immediately before the target advice starts.
110110

111111
Most `MethodMatcher` implementations are static, meaning that their `isRuntime()` method returns `false`.
112112
In this case, the three-argument `matches` method is never invoked.
@@ -232,7 +232,7 @@ The main example is the `control flow` pointcut.
232232
===== Control Flow Pointcuts
233233

234234
Spring control flow pointcuts are conceptually similar to AspectJ `cflow` pointcuts,
235-
although less powerful. (There is currently no way to specify that a pointcut executes
235+
although less powerful. (There is currently no way to specify that a pointcut runs
236236
below a join point matched by another pointcut.) A control flow pointcut matches the
237237
current call stack. For example, it might fire if the join point was invoked by a method
238238
in the `com.mycompany.web` package or by the `SomeCaller` class. Control flow pointcuts
@@ -425,7 +425,7 @@ The following listing shows the `MethodBeforeAdvice` interface:
425425
.Kotlin
426426
----
427427
interface MethodBeforeAdvice : BeforeAdvice {
428-
428+
429429
fun before(m: Method, args: Array<Any>, target: Any)
430430
}
431431
----
@@ -435,8 +435,8 @@ field before advice, although the usual objects apply to field interception and
435435
unlikely for Spring to ever implement it.)
436436

437437
Note that the return type is `void`. Before advice can insert custom behavior before the join
438-
point executes but cannot change the return value. If a before advice throws an
439-
exception, it aborts further execution of the interceptor chain. The exception
438+
point runs but cannot change the return value. If a before advice throws an
439+
exception, it stops further execution of the interceptor chain. The exception
440440
propagates back up the interceptor chain. If it is unchecked or on the signature of
441441
the invoked method, it is passed directly to the client. Otherwise, it is
442442
wrapped in an unchecked exception by the AOP proxy.
@@ -465,7 +465,7 @@ The following example shows a before advice in Spring, which counts all method i
465465
class CountingBeforeAdvice : MethodBeforeAdvice {
466466
467467
var count: Int = 0
468-
468+
469469
override fun before(m: Method, args: Array<Any>, target: Any?) {
470470
++count
471471
}
@@ -509,7 +509,7 @@ The following advice is invoked if a `RemoteException` is thrown (including from
509509
.Kotlin
510510
----
511511
class RemoteThrowsAdvice : ThrowsAdvice {
512-
512+
513513
fun afterThrowing(ex: RemoteException) {
514514
// Do something with remote exception
515515
}
@@ -563,7 +563,7 @@ methods can be combined in a single class. The following listing shows the final
563563
.Kotlin
564564
----
565565
class CombinedThrowsAdvice : ThrowsAdvice {
566-
566+
567567
fun afterThrowing(ex: RemoteException) {
568568
// Do something with remote exception
569569
}
@@ -604,7 +604,7 @@ An after returning advice in Spring must implement the
604604
.Kotlin
605605
----
606606
interface AfterReturningAdvice : Advice {
607-
607+
608608
fun afterReturning(returnValue: Any, m: Method, args: Array<Any>, target: Any)
609609
}
610610
----
@@ -639,7 +639,7 @@ not thrown exceptions:
639639
640640
var count: Int = 0
641641
private set
642-
642+
643643
override fun afterReturning(returnValue: Any?, m: Method, args: Array<Any>, target: Any?) {
644644
++count
645645
}
@@ -707,7 +707,7 @@ rather than the method, level. You can only use introduction advice with the
707707
interface IntroductionAdvisor : Advisor, IntroductionInfo {
708708
709709
val classFilter: ClassFilter
710-
710+
711711
@Throws(IllegalArgumentException::class)
712712
fun validateInterfaces()
713713
}
@@ -829,7 +829,7 @@ The following example shows the example `LockMixin` class:
829829
fun locked(): Boolean {
830830
return this.locked
831831
}
832-
832+
833833
override fun invoke(invocation: MethodInvocation): Any? {
834834
if (locked() && invocation.method.name.indexOf("set") == 0) {
835835
throw LockedException()

src/docs/asciidoc/core/core-aop.adoc

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ Spring AOP includes the following types of advice:
8383
an exception).
8484
* After returning advice: Advice to be run after a join point completes
8585
normally (for example, if a method returns without throwing an exception).
86-
* After throwing advice: Advice to be executed if a method exits by throwing an
86+
* After throwing advice: Advice to be run if a method exits by throwing an
8787
exception.
88-
* After (finally) advice: Advice to be executed regardless of the means by which a
88+
* After (finally) advice: Advice to be run regardless of the means by which a
8989
join point exits (normal or exceptional return).
9090
* Around advice: Advice that surrounds a join point such as a method invocation.
9191
This is the most powerful kind of advice. Around advice can perform custom behavior
@@ -219,7 +219,7 @@ To use @AspectJ aspects in a Spring configuration, you need to enable Spring sup
219219
configuring Spring AOP based on @AspectJ aspects and auto-proxying beans based on
220220
whether or not they are advised by those aspects. By auto-proxying, we mean that, if Spring
221221
determines that a bean is advised by one or more aspects, it automatically generates
222-
a proxy for that bean to intercept method invocations and ensures that advice is executed
222+
a proxy for that bean to intercept method invocations and ensures that advice is run
223223
as needed.
224224

225225
The @AspectJ support can be enabled with XML- or Java-style configuration. In either
@@ -334,7 +334,7 @@ hence, excludes it from auto-proxying.
334334
=== Declaring a Pointcut
335335

336336
Pointcuts determine join points of interest and thus enable us to control
337-
when advice executes. Spring AOP only supports method execution join points for Spring
337+
when advice runs. Spring AOP only supports method execution join points for Spring
338338
beans, so you can think of a pointcut as matching the execution of methods on Spring
339339
beans. A pointcut declaration has two parts: a signature comprising a name and any
340340
parameters and a pointcut expression that determines exactly which method
@@ -395,7 +395,7 @@ expressions:
395395
annotation (the execution of methods declared in types with the given annotation when
396396
using Spring AOP).
397397
* `@annotation`: Limits matching to join points where the subject of the join point
398-
(the method being executed in Spring AOP) has the given annotation.
398+
(the method being run in Spring AOP) has the given annotation.
399399

400400
.Other pointcut types
401401
****
@@ -1211,8 +1211,8 @@ The following example shows how to use after finally advice:
12111211
==== Around Advice
12121212

12131213
The last kind of advice is around advice. Around advice runs "`around`" a matched method's
1214-
execution. It has the opportunity to do work both before and after the method executes
1215-
and to determine when, how, and even if the method actually gets to execute at all.
1214+
execution. It has the opportunity to do work both before and after the method runs
1215+
and to determine when, how, and even if the method actually gets to run at all.
12161216
Around advice is often used if you need to share state before and after a method
12171217
execution in a thread-safe manner (starting and stopping a timer, for example). Always
12181218
use the least powerful form of advice that meets your requirements (that is, do not use
@@ -1221,7 +1221,7 @@ around advice if before advice would do).
12211221
Around advice is declared by using the `@Around` annotation. The first parameter of the
12221222
advice method must be of type `ProceedingJoinPoint`. Within the body of the advice,
12231223
calling `proceed()` on the `ProceedingJoinPoint` causes the underlying method to
1224-
execute. The `proceed` method can also pass in an `Object[]`. The values
1224+
run. The `proceed` method can also pass in an `Object[]`. The values
12251225
in the array are used as the arguments to the method execution when it proceeds.
12261226

12271227
NOTE: The behavior of `proceed` when called with an `Object[]` is a little different than the
@@ -1783,15 +1783,15 @@ annotation. Consider the following example:
17831783
}
17841784
----
17851785

1786-
In the preceding example, the effect of the `'perthis'` clause is that one aspect
1787-
instance is created for each unique service object that executes a business service (each
1788-
unique object bound to 'this' at join points matched by the pointcut expression). The
1789-
aspect instance is created the first time that a method is invoked on the service object.
1790-
The aspect goes out of scope when the service object goes out of scope. Before the aspect
1791-
instance is created, none of the advice within it executes. As soon as the aspect
1792-
instance has been created, the advice declared within it executes at matched join points,
1793-
but only when the service object is the one with which this aspect is associated. See the
1794-
AspectJ Programming Guide for more information on `per` clauses.
1786+
In the preceding example, the effect of the `perthis` clause is that one aspect instance
1787+
is created for each unique service object that performs a business service (each unique
1788+
object bound to `this` at join points matched by the pointcut expression). The aspect
1789+
instance is created the first time that a method is invoked on the service object. The
1790+
aspect goes out of scope when the service object goes out of scope. Before the aspect
1791+
instance is created, none of the advice within it runs. As soon as the aspect instance
1792+
has been created, the advice declared within it runs at matched join points, but only
1793+
when the service object is the one with which this aspect is associated. See the AspectJ
1794+
Programming Guide for more information on `per` clauses.
17951795

17961796
The `pertarget` instantiation model works in exactly the same way as `perthis`, but it
17971797
creates one aspect instance for each unique target object at matched join points.
@@ -2188,7 +2188,7 @@ significantly improve the readability of your code.
21882188

21892189
The `method` attribute identifies a method (`doAccessCheck`) that provides the body of
21902190
the advice. This method must be defined for the bean referenced by the aspect element
2191-
that contains the advice. Before a data access operation is executed (a method execution
2191+
that contains the advice. Before a data access operation is performed (a method execution
21922192
join point matched by the pointcut expression), the `doAccessCheck` method on the aspect
21932193
bean is invoked.
21942194

@@ -2250,7 +2250,7 @@ example, you can declare the method signature as follows:
22502250
[[aop-schema-advice-after-throwing]]
22512251
==== After Throwing Advice
22522252

2253-
After throwing advice executes when a matched method execution exits by throwing an
2253+
After throwing advice runs when a matched method execution exits by throwing an
22542254
exception. It is declared inside an `<aop:aspect>` by using the `after-throwing` element,
22552255
as the following example shows:
22562256

@@ -2325,8 +2325,8 @@ by using the `after` element, as the following example shows:
23252325
==== Around Advice
23262326

23272327
The last kind of advice is around advice. Around advice runs "around" a matched method
2328-
execution. It has the opportunity to do work both before and after the method executes
2329-
and to determine when, how, and even if the method actually gets to execute at all.
2328+
execution. It has the opportunity to do work both before and after the method runs
2329+
and to determine when, how, and even if the method actually gets to run at all.
23302330
Around advice is often used to share state before and after a method
23312331
execution in a thread-safe manner (starting and stopping a timer, for example). Always
23322332
use the least powerful form of advice that meets your requirements. Do not use around
@@ -2335,7 +2335,7 @@ advice if before advice can do the job.
23352335
You can declare around advice by using the `aop:around` element. The first parameter of the
23362336
advice method must be of type `ProceedingJoinPoint`. Within the body of the advice,
23372337
calling `proceed()` on the `ProceedingJoinPoint` causes the underlying method to
2338-
execute. The `proceed` method may also be called with an `Object[]`. The values
2338+
run. The `proceed` method may also be called with an `Object[]`. The values
23392339
in the array are used as the arguments to the method execution when it proceeds. See
23402340
<<aop-ataspectj-around-advice>> for notes on calling `proceed` with an `Object[]`.
23412341
The following example shows how to declare around advice in XML:
@@ -2563,7 +2563,7 @@ ms % Task name
25632563
[[aop-ordering]]
25642564
==== Advice Ordering
25652565

2566-
When multiple pieces of advice need to execute at the same join point (executing method)
2566+
When multiple pieces of advice need to run at the same join point (executing method)
25672567
the ordering rules are as described in <<aop-ataspectj-advice-ordering>>. The precedence
25682568
between aspects is determined via the `order` attribute in the `<aop:aspect>` element or
25692569
by either adding the `@Order` annotation to the bean that backs the aspect or by having
@@ -2772,7 +2772,7 @@ call `proceed` multiple times. The following listing shows the basic aspect impl
27722772
class ConcurrentOperationExecutor : Ordered {
27732773
27742774
private val DEFAULT_MAX_RETRIES = 2
2775-
2775+
27762776
private var maxRetries = DEFAULT_MAX_RETRIES
27772777
private var order = 1
27782778
@@ -2787,7 +2787,7 @@ call `proceed` multiple times. The following listing shows the basic aspect impl
27872787
fun setOrder(order: Int) {
27882788
this.order = order
27892789
}
2790-
2790+
27912791
fun doConcurrentOperation(pjp: ProceedingJoinPoint): Any {
27922792
var numAttempts = 0
27932793
var lockFailureException: PessimisticLockingFailureException
@@ -3160,13 +3160,13 @@ The key thing to understand here is that the client code inside the `main(..)` m
31603160
of the `Main` class has a reference to the proxy. This means that method calls on that
31613161
object reference are calls on the proxy. As a result, the proxy can delegate to all of
31623162
the interceptors (advice) that are relevant to that particular method call. However,
3163-
once the call has finally reached the target object (the `SimplePojo`, reference in
3163+
once the call has finally reached the target object (the `SimplePojo` reference in
31643164
this case), any method calls that it may make on itself, such as `this.bar()` or
31653165
`this.foo()`, are going to be invoked against the `this` reference, and not the proxy.
31663166
This has important implications. It means that self-invocation is not going to result
3167-
in the advice associated with a method invocation getting a chance to execute.
3167+
in the advice associated with a method invocation getting a chance to run.
31683168

3169-
Okay, so what is to be done about this? The best approach (the term, "`best,`" is used
3169+
Okay, so what is to be done about this? The best approach (the term "best" is used
31703170
loosely here) is to refactor your code such that the self-invocation does not happen.
31713171
This does entail some work on your part, but it is the best, least-invasive approach.
31723172
The next approach is absolutely horrendous, and we hesitate to point it out, precisely
@@ -3433,7 +3433,7 @@ exact semantics of "`after returning from the initialization of a new object`" a
34333433
fine. In this context, "`after initialization`" means that the dependencies are
34343434
injected after the object has been constructed. This means that the dependencies
34353435
are not available for use in the constructor bodies of the class. If you want the
3436-
dependencies to be injected before the constructor bodies execute and thus be
3436+
dependencies to be injected before the constructor bodies run and thus be
34373437
available for use in the body of the constructors, you need to define this on the
34383438
`@Configurable` declaration, as follows:
34393439

0 commit comments

Comments
 (0)