apache / apache/grails-intellij-plugin

Grails: invalid "Method may be static" reported

Open
#180 0 comments 0 reactions 0 assignees View on GitHub
bug imported-from-youtrack
Dominant language
Java
Stars
17
Forks
4
Avg merge
5d 15h
Merged PRs (30d)
4

Description

It seams that "Method may be static" does not take into account Grails implicit log variable, and probably others. For example following code will produce "Method may be static" on "private logSomething() method:
```
MyController {
def index() {
logSomething()
}

private logSomething() {
log.info("Something")
}
}
```
Of course, method may not be static, and will cause compilation error if one tries to make it static anyway.

---

*Imported from [IDEA-134559](https://youtrack.jetbrains.com/issue/IDEA-134559) · Type: Bug · Votes: 2*
*Comments, attachments, dates and reporter are not part of the export — follow the link above for the full history.*

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file, test, or entry point is named. Reproduce the Grails example and trace the inspection that reports "Method may be static"; done means the private method using Grails' implicit log variable is no longer incorrectly reported as static.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.