Community
Participate
Working Groups
One warning that would be good to have is a recursive call warning. I made the mistake of creating a method which called itself but I didn't mean to call itself I meant to call a different overloaded version of the method. This resulted in a runtime stackoverflowerror which unfortunately didn't reveal a stack trace and was thus quite hard to track down. It would be helpful if eclipse would highlight recursive method calls. They are quite rare and I think highlighting them in the text and reporting them as a warning in the summary would help people avoid this situtation. Thanks!
Interesting suggestion. Will consider post 3.0
sounds like a case for the proposed INFO severity
It feels more like a request for improving semantic colouring in editor than a true compiler diagnosis. Recursivity is not an coding bad practice, it only feels like something the editor should render amongst the various aspects it highlights already (field vs. local var, static vs. non static, etc). Note that only direct recursion is to be detected here.
Passing onto Text for further action.
We have other compiler diagnostics, e.g. 'Unqualified access to instance field' which are not directly bad coding practice and hence it might well make sense to have a compiler diagnostic for this one. Can the bug reporter clarify what he exactly desires.
I agree somehow, but at the time, we didn't have semantic colouring. Now we have it, we can introduce some nuance in how we surface some info to the user. Note: some consider unqualified field access as bad practice as error prone.
I think the most helpful thing would have been just syntax highlighting that displayed the recursive call in a distinguishable manner from other method calls. Thanks for considering the request!
I doubt the value of this highlighting given the fact that it could only mark direct recursion.
But this is all the reporter asked I believe.
(In reply to comment #9) > But this is all the reporter asked I believe. True - it's just that I don't deem this functionality very useful.
It is a rare use case because recursion is not used very often but given the problem I would have avoided had it been highlighted I think it is valuable. Anyway, thank you for taking the time to consider the feature!