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 209850 - 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 FIXED
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-03-21 12:20 UTC by stefan79
Modified: 2012-03-23 10:34 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (22.58 KB, image/png)
2012-03-21 12:22 UTC, stefan79
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stefan79 2012-03-21 12:20:14 UTC
[ BUILD # : 201203200400 ]
[ JDK VERSION : 1.7.3 ]

Example-Code:

Collection<Integer[]> myCollection = new ArrayList<Integer[]>();
        myCollection.add(new Integer[]{1, 2});

        for (Integer[] X1 : myCollection) { //Here the Hint "Unbalaced
read/write with arrays" is shown
            Integer Xx0 = X1[0]; //Here the Array is used
            Integer Xx1 = X1[1]; //And here again
            System.out.println(Xx0 + "->" + Xx1);
        }
Comment 1 stefan79 2012-03-21 12:22:05 UTC
Created attachment 117002 [details]
Screenshot
Comment 2 Jan Lahoda 2012-03-21 15:23:18 UTC
Thanks for the report, should be fixed in the trunk:
http://hg.netbeans.org/jet-main/rev/3a0663979d94
Comment 3 Quality Engineering 2012-03-23 10:34:34 UTC
Integrated into 'main-golden', will be available in build *201203230400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/3a0663979d94
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #209850: Unbalanced$Array needs to ignore for each variables.