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.
In 7.4 dev builds the "Format" action does not preserve newlines when formatting long lines. For example, the line: private final Cache<String, ImportTransaction> transactions = CacheBuilder.newBuilder().expireAfterAccess(1, TimeUnit.DAYS).build(); becomes private final Cache<String, ImportTransaction> transactions = CacheBuilder.newBuilder().expireAfterAccess(1, TimeUnit.DAYS).build(); Another example: protected void doDelete( final HttpServletRequest req, final HttpServletResponse resp) becomes protected void doDelete(final HttpServletRequest req, final HttpServletResponse resp)
The first example behavior is as designed - user typed newline is preserved, only '=' is moved to follow the Java Code Conventions (can be disabled via Tools -> Options -> Editor -> Formatting -> Java -> Wrapping -> Wrap After Assignment Operators). The second example - fixed in jet-main. http://hg.netbeans.org/jet-main/rev/746734f7d008
Integrated into 'main-silver', will be available in build *201307011244* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/746734f7d008 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #231703: Java source formatter does not preserve newlines - fixed.