This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 245321 - incorrect @Log annotation handling in static method
Summary: incorrect @Log annotation handling in static method
Status: NEW
Alias: None
Product: groovy
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Martin Janicek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-30 12:45 UTC by habdankm
Modified: 2014-06-30 12:49 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Netbeans report error when @Log annotation used in static method (10.01 KB, image/png)
2014-06-30 12:45 UTC, habdankm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description habdankm 2014-06-30 12:45:17 UTC
Created attachment 147828 [details]
Netbeans report error when @Log annotation used in static method

When @Log annotation is used then you are able to use log.info(), log.fine etc. methods in your code, without creating log object. This is correct usage in groovy (http://groovy.codehaus.org/Logging).
In Neatbeans 8.0 such a code:
private static exampleMethod (_opts) {
log.info ("Parsing cofiguration files")
}
is reported as an error. It should be reported as an error, because this code compile correctly.
Comment 1 habdankm 2014-06-30 12:49:34 UTC
full code:

@Log
public class Compare {
private static exampleMethod (_opts) {
log.info ("Parsing cofiguration files")
}
}

I'v made a mistake in bug description:
It should be reported as an error, because this code compile correctly.
should be
It should NOT be reported as an error, because this code compile correctly.