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 224879

Summary: Incorrect unused assignment warning - regression from 7.2
Product: java Reporter: Jan Lahoda <jlahoda>
Component: HintsAssignee: Jan Lahoda <jlahoda>
Status: VERIFIED FIXED    
Severity: normal CC: mmirilovic
Priority: P1    
Version: 7.3   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Jan Lahoda 2013-01-14 21:23:06 UTC
package test;

public class Test {

     public Test getParent() {
          return this;
     }

     public static void t(Iterable<? extends Test> tps) {
          for (Test tp : tps) {
               Test toResume = tp;
               while (toResume != null) {
                    toResume = toResume.getParent(); //incorrect unused assignment warning
               }
          }
     }
}
Comment 2 Quality Engineering 2013-01-15 10:52:13 UTC
Integrated into 'main-golden', will be available in build *201301150833* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/edcada9ec93d
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #224879: do not fake statement for condition for enhanced for loops.
Comment 3 Jan Lahoda 2013-01-16 13:05:51 UTC
Fixed by the above changeset.
Comment 4 Dusan Balek 2013-01-16 13:12:54 UTC
The fix seems to be OK.
Comment 5 Jiri Prox 2013-01-16 13:50:56 UTC
verified in trunk
Comment 6 Jan Lahoda 2013-01-17 14:34:31 UTC
release73:
http://hg.netbeans.org/releases/rev/2da3473bde30
Comment 7 Quality Engineering 2013-01-18 00:02:47 UTC
Integrated into 'releases', will be available in build *201301172100* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/2da3473bde30
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #224879: do not fake statement for condition for enhanced for loops.
Comment 8 Jiri Prox 2013-01-22 13:51:21 UTC
verified 


Product Version: NetBeans IDE 7.3 RC1 (Build 201301212100)
Java: 1.7.0_11; Java HotSpot(TM) 64-Bit Server VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_11-b21
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\jprox\AppData\Roaming\NetBeans\7.3rc1
Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\7.3rc1