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 254317 - Code format breaks Javadoc
Summary: Code format breaks Javadoc
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
: 254794 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-08-12 14:20 UTC by _ gtzabari
Modified: 2015-08-29 03:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Testcase (3.73 KB, application/octet-stream)
2015-08-12 14:22 UTC, _ gtzabari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2015-08-12 14:20:36 UTC
Product Version: NetBeans IDE Dev (Build 201508100002)
Java: 1.8.0_60-ea; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-ea-b25
System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev

1. Open testcase.
2. Replace the Javadoc for toString() with:

	/**
	 * {@inheritDoc}
	 *
	 * @return my special string
	 */

3. Invoke code format. Notice that the new Javadoc is:

	/**
	 * {@inheritDoc}
	 * <p>
	 * @return my special string
	 */

4. This is okay. Now invoke code format again. The new Javadoc is:

	/**
	 * {@inheritDoc} <p>
	 * @return my special string
	 */

5. This is unexpected (I am expecting code-format to be idempotent)

Similar (but worse) bug:

1. Enter the following Javadoc:

	/**
	 * {@inheritDoc}
	 * @return my special string
	 */

2. Code format results in:

	/**
	 * {@inheritDoc} @return my special string
	 */

3. This results in incorrect Javadoc (@return is treated as raw text instead of as a tag)
Comment 1 _ gtzabari 2015-08-12 14:22:43 UTC
Created attachment 155299 [details]
Testcase
Comment 2 Dusan Balek 2015-08-28 12:27:49 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/51db0de2ccf5
Comment 3 Dusan Balek 2015-08-28 12:29:26 UTC
*** Bug 254794 has been marked as a duplicate of this bug. ***
Comment 4 Quality Engineering 2015-08-29 03:03:36 UTC
Integrated into 'main-silver', will be available in build *201508290002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/51db0de2ccf5
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #254317 - Code format breaks Javadoc - fixed.