This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 253830 - [81cat] Java hint: SuspiciousNamesCombination doesn't work as expected
Summary: [81cat] Java hint: SuspiciousNamesCombination doesn't work as expected
Status: RESOLVED FIXED
Alias: None
Product: qa
Classification: Unclassified
Component: Test Specifications (show other bugs)
Version: 8.1
Hardware: PC Windows 8 x64
: P3 normal (vote)
Assignee: Jiri Prox
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-27 07:05 UTC by cezariusz
Modified: 2015-08-12 13:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cezariusz 2015-07-27 07:05:00 UTC
Link: http://services.netbeans.org/synergy/client/app/#/case/4989/suite/1691

Product Version: NetBeans IDE Dev (Build 201507240001)
Java: 1.8.0_51; Java HotSpot(TM) 64-Bit Server VM 25.51-b03
Runtime: Java(TM) SE Runtime Environment 1.8.0_51-b16
System: Windows 8 version 6.2 running on amd64; UTF-8; pl_PL (nb)

public class SuspiciousNamesCombination {
    public void method(int x) {        
    }        
    
    public void method2(int height) {        
    }        
    public void test(int width, int height, int number,int x, int y) {
        method(width);
        method2(y);
        
        x = height; //Hint: Suspicious Names combination
        
        method(height); //Hint: Suspicious Names combination
        method2(x); //Hint: Suspicious Names combination
        
        number = x; //Hint suspicious Names combination
        method(number); //Hint suspicious Names combination
    }
}

The last two hint's are missing.
Comment 1 Svata Dedic 2015-07-30 12:43:44 UTC
The identifier 'number' is not defined in the default configuration for the suspicious name hint. In order to trigger the hint on the last 2 lines, "number" would have to be defined in other group than "height" or "x".
Comment 2 Jiri Prox 2015-08-12 13:18:07 UTC
There was missing the guide how to configure the hint. I've added it
Thanks