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.
Created attachment 154679 [details] Export of NetBeans options for Editor, Formatting, Java Use Source->Format to format the code below. The last comment in the code block gets split when it should be left on a single line. I've attached an export of my options for {Editor, Formatting, Java}. Product Version: NetBeans IDE 8.0.2 (Build 201411181905) Updates: Updates available to version NetBeans 8.0.2 Patch 2 Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14 System: Linux version 3.9.4-200.fc18.x86_64 running on amd64; UTF-8; en_US (nb) ------------------------------------------------------- package junk; public class CommentBug { /* If you do Source->Format on this code, the second comment below is split into two lines, * even though that's not necessary. */ public void foo() { int someVariable = 10; int anotherVariable = (someVariable != 0) ? someVariable : 5; // Single line comment here.: /* Block comment here, but it should remain on a single line: */ } }
Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/5c46eaeb2a20
Integrated into 'main-silver', will be available in build *201509230002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/5c46eaeb2a20 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #253522 - Comment line is split when not required when using Source->Format - fixed.