Merge branch '6.0.x'

This commit is contained in:
Sébastien Deleuze 2023-08-10 19:13:19 +02:00
commit 566621f7e3
4 changed files with 9 additions and 9 deletions

View File

@ -176,7 +176,7 @@ Kotlin::
@AfterReturning( @AfterReturning(
pointcut = "execution(* com.xyz.dao.*.*(..))", pointcut = "execution(* com.xyz.dao.*.*(..))",
returning = "retVal") returning = "retVal")
fun doAccessCheck(retVal: Any) { fun doAccessCheck(retVal: Any?) {
// ... // ...
} }
} }
@ -448,7 +448,7 @@ Kotlin::
class AroundExample { class AroundExample {
@Around("execution(* com.xyz..service.*.*(..))") @Around("execution(* com.xyz..service.*.*(..))")
fun doBasicProfiling(pjp: ProceedingJoinPoint): Any { fun doBasicProfiling(pjp: ProceedingJoinPoint): Any? {
// start stopwatch // start stopwatch
val retVal = pjp.proceed() val retVal = pjp.proceed()
// stop stopwatch // stop stopwatch
@ -888,7 +888,7 @@ Kotlin::
"com.xyz.CommonPointcuts.inDataAccessLayer() && " + "com.xyz.CommonPointcuts.inDataAccessLayer() && " +
"args(accountHolderNamePattern)") // <1> "args(accountHolderNamePattern)") // <1>
fun preProcessQueryPattern(pjp: ProceedingJoinPoint, fun preProcessQueryPattern(pjp: ProceedingJoinPoint,
accountHolderNamePattern: String): Any { accountHolderNamePattern: String): Any? {
val newPattern = preProcess(accountHolderNamePattern) val newPattern = preProcess(accountHolderNamePattern)
return pjp.proceed(arrayOf<Any>(newPattern)) return pjp.proceed(arrayOf<Any>(newPattern))
} }

View File

@ -85,7 +85,7 @@ Kotlin::
} }
@Around("com.xyz.CommonPointcuts.businessService()") // <1> @Around("com.xyz.CommonPointcuts.businessService()") // <1>
fun doConcurrentOperation(pjp: ProceedingJoinPoint): Any { fun doConcurrentOperation(pjp: ProceedingJoinPoint): Any? {
var numAttempts = 0 var numAttempts = 0
var lockFailureException: PessimisticLockingFailureException var lockFailureException: PessimisticLockingFailureException
do { do {
@ -173,7 +173,7 @@ Kotlin::
---- ----
@Around("execution(* com.xyz..service.*.*(..)) && " + @Around("execution(* com.xyz..service.*.*(..)) && " +
"@annotation(com.xyz.service.Idempotent)") "@annotation(com.xyz.service.Idempotent)")
fun doConcurrentOperation(pjp: ProceedingJoinPoint): Any { fun doConcurrentOperation(pjp: ProceedingJoinPoint): Any? {
// ... // ...
} }
---- ----

View File

@ -435,7 +435,7 @@ Kotlin::
+ +
[source,kotlin,indent=0,subs="verbatim",role="secondary"] [source,kotlin,indent=0,subs="verbatim",role="secondary"]
---- ----
fun doBasicProfiling(pjp: ProceedingJoinPoint): Any { fun doBasicProfiling(pjp: ProceedingJoinPoint): Any? {
// start stopwatch // start stopwatch
val retVal = pjp.proceed() val retVal = pjp.proceed()
// stop stopwatch // stop stopwatch
@ -554,7 +554,7 @@ Kotlin::
class SimpleProfiler { class SimpleProfiler {
fun profile(call: ProceedingJoinPoint, name: String, age: Int): Any { fun profile(call: ProceedingJoinPoint, name: String, age: Int): Any? {
val clock = StopWatch("Profiling for '$name' and '$age'") val clock = StopWatch("Profiling for '$name' and '$age'")
try { try {
clock.start(call.toShortString()) clock.start(call.toShortString())
@ -890,7 +890,7 @@ Kotlin::
this.order = order this.order = order
} }
fun doConcurrentOperation(pjp: ProceedingJoinPoint): Any { fun doConcurrentOperation(pjp: ProceedingJoinPoint): Any? {
var numAttempts = 0 var numAttempts = 0
var lockFailureException: PessimisticLockingFailureException var lockFailureException: PessimisticLockingFailureException
do { do {

View File

@ -493,7 +493,7 @@ Kotlin::
class ProfilingAspect { class ProfilingAspect {
@Around("methodsToBeProfiled()") @Around("methodsToBeProfiled()")
fun profile(pjp: ProceedingJoinPoint): Any { fun profile(pjp: ProceedingJoinPoint): Any? {
val sw = StopWatch(javaClass.simpleName) val sw = StopWatch(javaClass.simpleName)
try { try {
sw.start(pjp.getSignature().getName()) sw.start(pjp.getSignature().getName())