Find Usage for final variables feature suggestion

When searching for usages of final variables, it would be great if there was
a checkbox like "search explicit value usage".

Consider the following case:
A constant string FOO equals to "foo" is used as a comparison value for an
http servlet request parameter value.
The servlet works correctly. Then the programmer decides to modify the value
to "oof", and suddenly the application breaks, because another programmer
(fired right after this discovery :)) used the string "foo" directly and
not through the constant.
The suggested feature would bring the floating "foo" to display without the
need to do more than 1 search.

Does this make sense to anyone else?

Amnon I. Govrin


1 comment
Comment actions Permalink

Yes - this also occurs when using IdeaJAD to decompile; constants show up in
the decompiled code. Would be nice to find all final variables with the
same value as the constant, to simplify figuring out what final variable was
actually referenced.

New plugin idea?

-Dave


0

Please sign in to leave a comment.