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 124169

Summary: Formatter Defaults for "Code Conventions for the Java Programming Language"
Product: java Reporter: bondolo <bondolo>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED    
Severity: blocker CC: hmichel
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description bondolo 2007-12-17 23:38:05 UTC
There are currently some differences between the style used by the NetBeans Java formatter and the coding conventions
documented in:

http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html

Could either the NetBeans defaults be changed to conform to the long standing JavaStyle defaults or a "Set to JavaStyle
Defaults" button be provided? 

It's not that I personally agree with the JavaStyle format chapter and verse but I'm hoping this can help solve some of
the ongoing styler + version control wars (wherein everyone applies their styler to code they edit and then check it in
resulting is many minor changes due only to styler setting differences).
Comment 1 Dusan Balek 2009-07-30 14:58:10 UTC
Could you please describe particular differences from Java Style defaults. Thanks.
Comment 2 bondolo 2012-09-14 17:14:57 UTC
Section 8.2: Casts should be followed by a blank space.

http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-141388.html#682

Currently NetBeans defaults to no space after a cast.
Comment 3 Dusan Balek 2012-09-17 08:37:53 UTC
Should be fixed in the current dev build.