Closed seandenigris closed 9 years ago
fixed and tested
Reported by anquetil.nicolas
on 2012-03-23 17:33:29
Fixed
Reported by tudor@tudorgirba.com
on 2013-03-03 12:55:47
The problem seems to be back again. I just checked with the latest VerveineJ and for
a code that looks like (taken from Jenkins):
@Restricted(NoExternalUse.class)
public transient final NodeProvisioner overallNodeProvisioner = unlabeledNodeProvisioner;
I get an annotation instance that looks like
(FAMIX.AnnotationInstanceAttribute (id: 126)
(annotationTypeAttribute (ref: 138875))
(parentAnnotationInstance (ref: 8858))
(value 'public class org.kohsuke.accmod.restrictions.NoExternalUse
extends org.kohsuke.accmod.restrictions.DoNotUse
/* methods */
[unresolved] public void <init>()
[unresolved] public void error(Unresolved type org.kohsuke.accmod.impl.Location, Unresolved
type org.kohsuke.accmod.impl.RestrictedElement, Unresolved type org.kohsuke.accmod.impl.ErrorListener)
'))
It would be so great if someone could take a look at this.
Reported by tudor@tudorgirba.com
on 2013-08-09 20:59:04
New
Flagging as Invalid because I was enabled to reproduce the error.
tried (not all combinations):
- library annotation, project local annotation
- library class as parameter, project local class as parameter
- annotation on attribute, on method, on class
Reported by anquetil.nicolas
on 2013-08-14 15:38:28
Invalid
I am reopening it again, but this time I have an example project that shows the problem
in the attachment.
If you parse that one with the latest VerveineJ, you get the following AnnotationInstanceAttribute:
(FAMIX.AnnotationInstanceAttribute (id: 5)
(annotationTypeAttribute (ref: 14))
(parentAnnotationInstance (ref: 16))
(value '(id=NoId)
public class annotationTest.InterceptorClass
extends java.lang.Object
/* methods */
[unresolved] public void <init>()
'))
Reported by tudor@tudorgirba.com
on 2013-08-20 09:55:39
New
OK
thanks for the example
I believe it fixed now
Reported by anquetil.nicolas
on 2013-08-23 13:41:31
Fixed
Great. I will test it right away
Reported by tudor@tudorgirba.com
on 2013-08-23 14:14:26
I tested it and it works in the previous case, but I found another one for which it
does not work properly.
Namely:
@Interceptors({InterceptorClass.class, AnotherInterceptorClass.class})
public class AnotherAnnotatedClass {
}
produces:
(FAMIX.AnnotationInstanceAttribute (id: 26)
(annotationTypeAttribute (ref: 9))
(parentAnnotationInstance (ref: 3))
(value 'InterceptorClass.class'))
The value should be '{InterceptorClass.class, AnotherInterceptorClass.class}'. Or we
can make it such that value accepts a collection, and then value can be
(value 'InterceptorClass.class' 'AnotherInterceptorClass.class')
Reported by tudor@tudorgirba.com
on 2013-08-23 14:40:33
New
I forgot to mention that I attached a test project.
Reported by tudor@tudorgirba.com
on 2013-08-23 14:41:04
This is becoming more difficult.
First I choose the solution of "{InterceptorClass.class, AnotherInterceptorClass.class}"
to avoid changing FAMIX and make it unnecessarily complex
second, the problem with the previous pb was that the annotationInstanceAttribute
"InterceptorClass.class" was treated as an array of one element by JDT
I corrected it by taking the first element of the array.
Now, {InterceptorClass.class, AnotherInterceptorClass.class} is also an array and it
did not show correctly because verveinej took only the first element.
This is easy to solve when the array has more than one element.
But when it has only one element, I have no way to tell the difference between
"InterceptorClass.class" and "{InterceptorClass.class}".
I choose to always consider it is the first solution (so I don't put {} around an array
of one)
Hope it will be acceptable to all
Reported by anquetil.nicolas
on 2013-08-23 21:29:35
Fixed
Originally reported on Google Code with ID 714
Reported by
tudor.girba
on 2011-09-27 09:47:15