Polish "Handle arbitrary JoinPoint argument index"

See gh-34316
This commit is contained in:
Stéphane Nicoll
2025-02-05 11:49:56 +01:00
parent 13ba770428
commit fb6e86551a
2 changed files with 50 additions and 47 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -281,7 +281,7 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
if (argType == JoinPoint.class ||
argType == ProceedingJoinPoint.class ||
argType == JoinPoint.StaticPart.class) {
String[] oldNames = this.argumentNames;
String[] oldNames = this.argumentNames;
this.argumentNames = new String[oldNames.length + 1];
System.arraycopy(oldNames, 0, this.argumentNames, 0, i);
this.argumentNames[i] = "THIS_JOIN_POINT";