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.
Product Version: NetBeans IDE Dev (Build 201702020002) Java: 1.8.0_111; Java HotSpot(TM) 64-Bit Server VM 25.111-b09 Runtime: Java(TM) SE Runtime Environment 1.8.0_111-b09 Steps to reproduce: take this code: public static void main(String[] args) { boolean b = false; for(int i=0;i<10;i++) if(b) System.out.println(b); } Select all code inside function and invoke code format. IDE adds opening brackets after for code and after if code but not adds corresponding closing brackets