Bug 112460

Summary: [formatting] Whitespace after empty javadoc lines.
Product: [Eclipse Project] JDT Reporter: Hilbert Schraal <hilbert>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: syvalta
Version: 3.1   
Target Milestone: 3.3 M6   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Hilbert Schraal CLA 2005-10-13 07:41:34 EDT
When formatting Java code (shift + ctrl + f), empty javadoc lines will get
trailing whitespace. This is not desirable. It e.g. generates loads of errors
when using the checkstyle plugin.

e.g.

/**
 * Messages for the SWT Calendar.
 * 
 * @author schraal
 */

(note the trailing space in the empty javadoc line).
Comment 1 Olivier Thomann CLA 2007-03-07 14:38:57 EST
Closing as INVALID since the editor removes trailing spaces on save now.
Comment 2 Sei Syvalta CLA 2011-10-03 08:32:26 EDT
Eclipse Java EE IDE for Web Developers.

Version: Indigo Service Release 1
Build id: 20110916-0149

Under "Java" - "Editor" - "Save Actions", enable:
- Perform selected actions on save
 - Format source code
  - Format all lines
- Additional actions
 - Remove trailing white spaces on all lines

This results in empty spaces after empty javadoc lines.

The end result is that if you use "format on save" action you cannot prevent the trailing spaces of appearing (perhaps because of the order the actions are executed).

There seems to be discussion about the issue also in stackoverflow: http://stackoverflow.com/questions/7008340/eclipse-formatter-adds-space-in-empty-comment-lines

Could this issue be reopened or should I create a new issue?
Comment 3 Sei Syvalta CLA 2011-10-11 05:57:03 EDT
Created a distinct issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=360523