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 255742 - [81cat] Inspect and transform duplicates javadoc
Summary: [81cat] Inspect and transform duplicates javadoc
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.2
Hardware: PC Windows 8
: P2 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-06 16:06 UTC by misterm
Modified: 2016-03-03 02:06 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (113.95 KB, text/plain)
2015-10-06 16:06 UTC, misterm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description misterm 2015-10-06 16:06:18 UTC
Product Version = NetBeans IDE Dev (Build 20151002-3d4c315fd13b)
Operating System = Windows 8 version 6.2 running on amd64
Java; VM; Vendor = 1.8.0_40
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.40-b25

Reproducibility: Happens every time

STEPS:
If you have code like:

/**
 * Javadoc
 */
@Transactional
public void myMethod()

And apply the following hint via Inspect and transform:

@org.springframework.transaction.annotation.Transactional
=> @javax.ejb.TransactionAttribute
;;

ACTUAL:
It duplicates javadoc:
/**
 * Javadoc
 */
/**
 * Javadoc
 */
@TransactionAttribute
public void myMethod()

EXPECTED:
Instead of just changing the annotation:
/**
 * Javadoc
 */
@TransactionAttribute
public void myMethod(
Comment 1 misterm 2015-10-06 16:06:22 UTC
Created attachment 156565 [details]
IDE log
Comment 2 Svata Dedic 2015-10-07 11:09:24 UTC
Not a P2, IMHO: it does not break code to be uncompilable.
Comment 3 misterm 2015-10-07 12:27:54 UTC
I respectfully disagree. Apply this to a 1k files project and see it resulting in 3k changes and having you to manually delete the duplicated comments in order not to mess with your diff and you'll understand why it is a P2. That's my use case :-S
Comment 4 Svata Dedic 2016-02-29 13:33:07 UTC
Will be fixed as jet-main#2340b8ce53bf
Comment 5 Quality Engineering 2016-03-03 02:06:21 UTC
Integrated into 'main-silver', will be available in build *201603030002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/2340b8ce53bf
User: Svata Dedic <sdedic@netbeans.org>
Log: #255742: javadoc comments are assigned to their declarative parents and then ignored from other mappings. mapComments will use larger context to avoid javadoc mis-assignment