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 211589 - Java-Hint "Unbalaced read/write with arrays" is wrong at Arrays
Summary: Java-Hint "Unbalaced read/write with arrays" is wrong at Arrays
Status: RESOLVED DUPLICATE of bug 211248
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-23 12:37 UTC by stefan79
Modified: 2012-04-23 13:48 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sample class. (365 bytes, text/x-java)
2012-04-23 12:38 UTC, stefan79
Details
Screenshot (25.18 KB, image/png)
2012-04-23 12:39 UTC, stefan79
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stefan79 2012-04-23 12:37:52 UTC
[ BUILD # : 201204220400 ]
[ JDK VERSION : 1.7.3 ]

At the following code, the array is shown as unbalanced:
..
    public NewClass() {
        String[] myArray = createArray();
        
        String val1 = myArray[0];
        String val2 = myArray[1];
        
        System.out.println("1: " + val1 + " 2: " + val2);
    }

    private String[] createArray() {
        return new String[] {"1", "2"};
    }
..
Comment 1 stefan79 2012-04-23 12:38:20 UTC
Created attachment 118632 [details]
Sample class.
Comment 2 stefan79 2012-04-23 12:39:37 UTC
Created attachment 118633 [details]
Screenshot
Comment 3 Jan Lahoda 2012-04-23 13:48:01 UTC
Fixed as bug #211248. Thanks for the report anyway.

*** This bug has been marked as a duplicate of bug 211248 ***