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 251667 - Javadoc reformat on save adds unnecessary asterisk
Summary: Javadoc reformat on save adds unnecessary asterisk
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-06 09:02 UTC by cezariusz
Modified: 2015-04-06 09:02 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 cezariusz 2015-04-06 09:02:03 UTC
Product Version: NetBeans IDE Dev (Build 201504030001)
Java: 1.8.0_25; Java HotSpot(TM) 64-Bit Server VM 25.25-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b18
System: Windows 7 version 6.1 running on amd64; Cp1250; pl_PL (nb)

Consider the following code:

public class NewClass {
    /**
     * An Information message is received, with proposed time reference P a set of capable time references C.
     */
    Event RcvInfo(Time P, Set<Time> C) {
        return null;
    }
}

Execute source format to get this:

public class NewClass {

    /**
     * An Information message is received, with proposed time reference P a set
     * of capable time references C.
     */
    Event RcvInfo(Time P, Set<Time> C) {
        return null;
    }
}

Note that the comment has been automatically wrapped at column 80. Save the file and turn on the option to reformat modified lines on save (Tools -> Options -> Editor -> On Save -> Reformat -> Modified Lines Only). Now add the word "and" between "P" and "a":

    /**
     * An Information message is received, with proposed time reference P and a set
     * of capable time references C.
     */

Save file so it reformats again and here's the result:

public class NewClass {

    /**
     * An Information message is received, with proposed time reference P and a
     * set     * of capable time references C.
     */
    Event RcvInfo(Time P, Set<Time> C) {
        return null;
    }
}

The line next to the modified is incorrectly formatted, because it keeps the starting asterisk and leading spaces:

     * set     * of capable time references C.
            ^^^^