Bug 224956 - Annotation usage in groovy
Annotation usage in groovy
Status: VERIFIED FIXED
Product: groovy
Classification: Unclassified
Component: Editor
7.3
PC Linux
: P2 with 1 vote (vote)
: 7.3
Assigned To: Martin Janicek
issues@groovy
: 73_HR_FIX
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-16 10:02 UTC by leelists
Modified: 2013-01-24 08:54 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description leelists 2013-01-16 10:02:29 UTC
I tried to use the following annotation in groovy code :

Netbeans mark's the lines in red (value is not part of the annotation Tag)

But there's no compilation error.

Tag.java :

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Tag
{
    int value();
} 

UsingTag.groovy :

public class UsingTag {
   @Tag(value=5)
   int member
}
Comment 1 Martin Janicek 2013-01-16 10:29:16 UTC
Thanks for the report. I'll take a look later this week
Comment 2 Martin Janicek 2013-01-16 15:33:18 UTC
Similar to issue 167284. Fixed in: web-main #6728c157fd89
Comment 3 Martin Janicek 2013-01-16 15:39:05 UTC
Hard to say for me whether this should be a part of NB7.3 or not. I can imagine this to be quite annoying for the user, but on the other hand it's not a P1 (the code compiles just fine, only the error badge is shown). CCing Vlada, what do you think?

From my point of view the fix is pretty small and safe. The changed code was not a part of 7.2 anyway (it was created as a fix for #167284).
Comment 4 Vladimir Riha 2013-01-16 16:17:03 UTC
I'm not sure either but I agree it really doesn't look good to have marked entire project with error badge due to this valid code. If the fix is really safe, I'd vote for transplanting to 73
Comment 5 Quality Engineering 2013-01-17 02:49:11 UTC
Integrated into 'main-golden', will be available in build *201301170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6728c157fd89
User: Martin Janicek <mjanicek@netbeans.org>
Log: #224956 - Annotation usage in groovy
Comment 6 Vladimir Riha 2013-01-17 07:54:57 UTC
Verified in trunk, no error badge is there with given sample. Please continue with HR integration process


Product Version: NetBeans IDE Dev (Build 201301170001)
Java: 1.7.0_10; Java HotSpot(TM) Client VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_10-b18
System: Linux version 3.2.0-35-generic-pae running on i386; UTF-8; en_US (nb)
Comment 7 Martin Janicek 2013-01-17 10:02:24 UTC
CCing PetrH. Could you please review the fix?
Comment 8 Petr Hejl 2013-01-22 15:20:59 UTC
(In reply to comment #7)
> CCing PetrH. Could you please review the fix?

The fix seems to be ok.
Comment 9 leelists 2013-01-22 15:32:11 UTC
Last nightly build work's for me,

Thanks
Comment 10 Martin Janicek 2013-01-23 08:18:07 UTC
Transplanted into the releases repository in: releases #90adbb1289bb
Comment 11 Quality Engineering 2013-01-24 00:54:03 UTC
Integrated into 'releases', will be available in build *201301232200* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/90adbb1289bb
User: Martin Janicek <mjanicek@netbeans.org>
Log: #224956 - Annotation usage in groovy
Comment 12 Vladimir Riha 2013-01-24 08:54:32 UTC
verified

Product Version: NetBeans IDE 7.3 RC1 (Build 201301232200)
Java: 1.7.0_11; Java HotSpot(TM) Client VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_11-b21
System: Linux version 3.2.0-35-generic-pae running on i386; UTF-8; en_US (nb)


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo