| 
| Parameterized vararg match problem [message #56077] | Sat, 27 August 2005 21:44  |  | 
| Eclipse User  |  |  |  |  | Hi, 
 The pointcut in the example below is not applied.
 
 public class Test1<E> {
 public void method1(E...args) {
 }
 }
 
 public aspect TestAspect {
 after(Test1 test1, Object[] arg) returning: execution(*
 Test1.method1(Object...)) && target(test1) && args(arg) {
 System.out.println("got here");
 }
 }
 
 If I remove vararg from the pointcut declaration (below) then the pointcut
 is applied ok.
 
 
 public aspect TestAspect {
 after(Test1 test1) returning: execution(* Test1.method1(Object...)) &&
 target(test1) {
 System.out.println("got here");
 }
 }
 
 Is there something wrong with the declaration or is it a bug?
 
 I am using AJDT M3.
 
 Thanks,
 Roman
 |  |  |  | 
|  | 
| 
| Re: Parameterized vararg match problem [message #56311 is a reply to message #56157] | Tue, 30 August 2005 20:19  |  | 
| Eclipse User  |  |  |  |  | https://bugs.eclipse.org/bugs/show_bug.cgi?id=108437 
 Thanks,
 Roman
 
 "Adrian Colyer" <adrian_colyer@uk.ibm.com> wrote in message
 news:df220a$b4h$1@news.eclipse.org...
 > Roman Kishchenko wrote:
 >> Hi,
 >>
 >> The pointcut in the example below is not applied.
 >>
 >> public class Test1<E> {
 >>     public void method1(E...args) {
 >>     }
 >> }
 >>
 >> public aspect TestAspect {
 >>     after(Test1 test1, Object[] arg) returning: execution(*
 >> Test1.method1(Object...)) && target(test1) && args(arg) {
 >>         System.out.println("got here");
 >>     }
 >> }
 >>
 >
 > I confirm I can reproduce this bug. It only occurs when the vararg type is
 > a type parameter (ie. if you change the definition of method1 to take an
 > (Object... args) parameter then the matching works as expected.
 >
 > Please raise a bug report and I'll get this fixed for you.
 > Thks, Adrian.
 |  |  |  | 
| 
| Re: Parameterized vararg match problem [message #589937 is a reply to message #56077] | Tue, 30 August 2005 12:37  |  | 
| Eclipse User  |  |  |  |  | Roman Kishchenko wrote: > Hi,
 >
 > The pointcut in the example below is not applied.
 >
 > public class Test1<E> {
 >     public void method1(E...args) {
 >     }
 > }
 >
 > public aspect TestAspect {
 >     after(Test1 test1, Object[] arg) returning: execution(*
 > Test1.method1(Object...)) && target(test1) && args(arg) {
 >         System.out.println("got here");
 >     }
 > }
 >
 
 I confirm I can reproduce this bug. It only occurs when the vararg type
 is a type parameter (ie. if you change the definition of method1 to take
 an (Object... args) parameter then the matching works as expected.
 
 Please raise a bug report and I'll get this fixed for you.
 Thks, Adrian.
 |  |  |  | 
| 
| Re: Parameterized vararg match problem [message #589954 is a reply to message #56157] | Tue, 30 August 2005 20:19  |  | 
| Eclipse User  |  |  |  |  | https://bugs.eclipse.org/bugs/show_bug.cgi?id=108437 
 Thanks,
 Roman
 
 "Adrian Colyer" <adrian_colyer@uk.ibm.com> wrote in message
 news:df220a$b4h$1@news.eclipse.org...
 > Roman Kishchenko wrote:
 >> Hi,
 >>
 >> The pointcut in the example below is not applied.
 >>
 >> public class Test1<E> {
 >>     public void method1(E...args) {
 >>     }
 >> }
 >>
 >> public aspect TestAspect {
 >>     after(Test1 test1, Object[] arg) returning: execution(*
 >> Test1.method1(Object...)) && target(test1) && args(arg) {
 >>         System.out.println("got here");
 >>     }
 >> }
 >>
 >
 > I confirm I can reproduce this bug. It only occurs when the vararg type is
 > a type parameter (ie. if you change the definition of method1 to take an
 > (Object... args) parameter then the matching works as expected.
 >
 > Please raise a bug report and I'll get this fixed for you.
 > Thks, Adrian.
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.52733 seconds