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 270558 - unexpectet indentation
Summary: unexpectet indentation
Status: NEW
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: issues@ide
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-04 10:08 UTC by muellermi
Modified: 2017-05-04 10:08 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (249.64 KB, text/plain)
2017-05-04 10:08 UTC, muellermi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description muellermi 2017-05-04 10:08:27 UTC
Product Version = NetBeans IDE 8.2 (Build 201609300101)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.8.0_112
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.112-b15

Reproducibility: Happens every time

given this code, formated as expected:

        _priorCalcBasics.getCostCenterCosts().stream()
                .map((ccc) -> {
                    KGLListCostCenterCost c = new KGLListCostCenterCost();
                    c.setPrior(ccc);
                    c.setCostCenterText(ccc.getCostCenterText());
                    c.setCostCenter(ccc.getCostCenter());
                    c.setPriorId(ccc.getPriorId());
                    c.setDepartmentKey(ccc.getDepartmentKey());
                    return c;
                }).forEachOrdered((c) -> {
                    calcBasics.getCostCenterCosts().add(c);
                });

now format the code (Alt+Shift+F):

        _priorCalcBasics.getCostCenterCosts().stream()
                .map((ccc) -> {
                    KGLListCostCenterCost c = new KGLListCostCenterCost();
                    c.setPrior(ccc);
                    c.setCostCenterText(ccc.getCostCenterText());
                    c.setCostCenter(ccc.getCostCenter());
                    c.setPriorId(ccc.getPriorId());
                    c.setDepartmentKey(ccc.getDepartmentKey());
                    return c;
                }).forEachOrdered((c) -> {
            calcBasics.getCostCenterCosts().add(c);
        });

NetBeans does not indent the forEach loop properly, shall be formated as above (more readable and expected by checkstyle)
Comment 1 muellermi 2017-05-04 10:08:34 UTC
Created attachment 164244 [details]
IDE log