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 271021 - Bug in ide triggered by using the increment after (i++) operator in while loop condition
Summary: Bug in ide triggered by using the increment after (i++) operator in while loo...
Status: NEW
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.2
Hardware: PC Windows 10
: P3 normal (vote)
Assignee: issues@ide
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-02 14:34 UTC by zenithy
Modified: 2017-07-02 14:34 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (43.40 KB, text/plain)
2017-07-02 14:34 UTC, zenithy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zenithy 2017-07-02 14:34:48 UTC
Product Version = NetBeans IDE 8.2 (Build 201705191307)
Operating System = Windows 10 version 10.0 running on amd64
Java; VM; Vendor = 1.8.0_101
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.101-b13

Reproducibility: Happens every time

Using the increment after operator i.e i++ in a while loop condition causes the ide to exhibit defective behavior by expecting semicolons after every closing brace ({), and hence incorrectly reports syntax errors on all closing braces. Refactoring the code to place the increment after operator inside the while block instead of in the while condition fixes the false syntax error reports

//sample of code that causes the bug to show up, notice the increment after operator i++ in the while condition
while (i++ < ct) {
               
            }

Thanks
Comment 1 zenithy 2017-07-02 14:34:57 UTC
Created attachment 164677 [details]
IDE log