Rename variable refactoring suggests unexpected variable names when variable is initialized with null.
Consider the following lines of code with the suggested variable names underneath: 1) RuntimeException stupidName; -> stupidName, exception, runtimeException 2) RuntimeException stupidName = null; -> stupidName, o 3) RuntimeException stupidName = new RuntimeException(); -> stupidName, exception, runtimeException 4) RuntimeException stupidName = new IllegalArgumentException(); -> stupidName, exception, argumentException, illegalArgumentException It looks like the algorithm looks at the type of the variable only if it's not assigned a value (example 1). As soon as it's assigned something (examples 2-4), the suggested variable names are based on the type of the assigned value. That might make sense for example 3 and 4, but not so for example 2, I think. I suggest treating example 2 like example 1: RuntimeException stupidName = null; -> stupidName, exception, runtimeException Another minor thing, but I thought I'd mention it anyways. -Thomas ************************************ If this email is not intended for you, or you are not responsible for the delivery of this message to the addressee, please note that this message may contain ITT Privileged/Proprietary Information. In such a case, you may not copy or deliver this message to anyone. You should destroy this message and kindly notify the sender by reply email. Information contained in this message that does not relate to the business of ITT is neither endorsed by nor attributable to ITT. ************************************ _______________________________________________ Eap-list mailing list [EMAIL PROTECTED] http://www.intellij.com/mailman/listinfo/eap-list
