Community
Participate
Working Groups
Report final use : It is possible with this architecture to report that a member, a method or a parameter or a local variable is used as an final one (not reassigned). In that case a hint would be to mention that. Report static use : It is possible with this architecture to report that a method is a static one (no access to this). In that case a hint would be to mention that
Doing a full analysis would be quite expensive, and would require a dedicated QA tool. A local diagnosis to a compilation unit is in range for the compiler though, and we currently perform similar analysis for diagnosing unused private members (as we known private members cannot be used from the outside, the amount of analysis involved here is quite small). We could extend our diagnosis to report these particular scenarii.
*** Bug 48239 has been marked as a duplicate of this bug. ***
Will reconsider post 3.0
Some hints Report static ------------- If IsImplicitThisMask is not flagged in non static method or inner class, to report in MethodScope and in ClassScope a IProblem.PotentiallyStaticMethodOrClass (or something like that) Report final ------------ I propose in org.eclipse.jdt.internal.compiler.lookup.CompilerModifiers the constant "AccReUsed" for member, method, parameter or local variable which could overlapp the value of AccIsDefaultConstructor (for example) or something in ASTNode. It simply check in Assignment : * it will position AccReUsed in non final member, parameter or local variable if assigned a second time. and in MethodDeclaration (or may be in MethodScope) : * position AccReUsed in non final method if the method is overridden
reopen bug for 3.1 or later
Deferring post 3.1
Can we reconsider this RFE ?
Too late for 3.3.
Can we reconsider it for 3.4 ?
This is not on the plan, but a patch is always welcome.