[jboss-cvs] JBossAS SVN: r60418 - projects/aop/trunk/aop/src/main/org/jboss/aop/advice/annotation.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Feb 7 20:32:48 EST 2007
Author: flavia.rainone at jboss.com
Date: 2007-02-07 20:32:48 -0500 (Wed, 07 Feb 2007)
New Revision: 60418
Modified:
projects/aop/trunk/aop/src/main/org/jboss/aop/advice/annotation/AnnotatedParameterAdviceInfo.java
Log:
[JBAOP-320] Treat negative @Arg index
Modified: projects/aop/trunk/aop/src/main/org/jboss/aop/advice/annotation/AnnotatedParameterAdviceInfo.java
===================================================================
--- projects/aop/trunk/aop/src/main/org/jboss/aop/advice/annotation/AnnotatedParameterAdviceInfo.java 2007-02-07 23:24:41 UTC (rev 60417)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/advice/annotation/AnnotatedParameterAdviceInfo.java 2007-02-08 01:32:48 UTC (rev 60418)
@@ -519,7 +519,16 @@
// parameter index is set on @Arg annotation
if (indexes[i][1] != -1)
{
- // wrong index set
+ // negative index
+ if (indexes[i][1] < 0)
+ {
+ if (AspectManager.verbose)
+ {
+ AdviceMethodFactory.adviceMatchingMessage.append("\n[warn] - Negative joinpoint parameter indexes are not allowed.");
+ }
+ return false;
+ }
+ // wrong index
if (indexes[i][1] >= expectedTypes.length)
{
if (AspectManager.verbose)
More information about the jboss-cvs-commits
mailing list