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

Summary: incorrect @Log annotation handling in static method
Product: groovy Reporter: habdankm
Component: EditorAssignee: Martin Janicek <mjanicek>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Netbeans report error when @Log annotation used in static method

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.