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 221391 - format adds a new line every time it is used
Summary: format adds a new line every time it is used
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.2
Hardware: PC Windows 8 x64
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-02 22:04 UTC by andie2302
Modified: 2012-11-15 02:46 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andie2302 2012-11-02 22:04:49 UTC
If a comment like in:

class a {
    /**
     * (<
     * @param test
     */
}

is automatically formatted then the autoformat (Ctrl+Shift+F) adds an additional line every time it is used.

The comment above is the smallest comment to reproduce the error with my computer.


I can reproduce the error if:

# The comment is inside a class.
# The comment starts with /**    (not /*)
# The comment contains at least one character (exept ' ' or '*') followed by '<'
# The comment contains a new line starting with @ like @param or @return.

This problem also occurs with:

class a {

    /**
     * Checks if a < b.
     *
     * @param a Number 1
     * @param b Number 2
     * @return true... yes, false... no
     */
    public boolean check(int a, int b) {
        return a < b;
    }
}
Comment 1 Jiri Prox 2012-11-05 16:04:26 UTC
Reproducible,

but I'm not sure if < is valid in javadoc. The javadoc is in fact html, so it would be better to replace it with &lt;. See that the symbol < is not visible in any javadoc view
Comment 2 Dusan Balek 2012-11-13 15:34:22 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/4c312cf87e54
Comment 3 Quality Engineering 2012-11-15 02:46:39 UTC
Integrated into 'main-golden', will be available in build *201211150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/4c312cf87e54
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #221391: format adds a new line every time it is used - fixed.