Misplaced warning.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Misplaced warning.

tkellerer

Owen Thomas wrote:
> Hence, the IDE would only need to look this far to determine that getPrincipledQuale would never return null.
That might be true for this specific case.

But in order to display those warnings correctly for all cases, the IDE would have to be prepared to inspect the complete call and inheritance chain for that function including all variables used in that function and any variable (and their classes) used in the complete call and inheritance chain.

Hardly anything that can be done fast enough "on-the-fly".




Reply | Threaded
Open this post in threaded view
|

Re: Misplaced warning.

Owen Thomas-2
Yea... I suppose that there are plenty of times where the IDE cannot (yet) see the purpose built into a program, but I also suppose the IDE should be capable of working it out if it can be determined this easily.

Anyway, it's merely a suggestion for an improvement. I have found that my prayers have been answered when put to the group before. I'll work around it for now (put in p!=null&&), and hope to see the improvement in a future release.

On 18 April 2017 at 23:58, tkellerer <[hidden email]> wrote:

Owen Thomas wrote:
> Hence, the IDE would only need to look this far to determine that getPrincipledQuale would never return null.
That might be true for this specific case.

But in order to display those warnings correctly for all cases, the IDE would have to be prepared to inspect the complete call and inheritance chain for that function including all variables used in that function and any variable (and their classes) used in the complete call and inheritance chain.

Hardly anything that can be done fast enough "on-the-fly".