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 205525 - GeneratorUtilities.copyComments() prints an exception when there are no comments
Summary: GeneratorUtilities.copyComments() prints an exception when there are no comments
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
: 206086 207791 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-24 13:12 UTC by Ralph Ruijs
Modified: 2012-02-14 15:42 UTC (History)
4 users (show)

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 Ralph Ruijs 2011-11-24 13:12:22 UTC
GeneratorUtilities.copyComments() prints an exception when the source tree has no comments. I think if there are no comments it should not copy anything and not print any errors.

Nov 24, 2011 2:00:31 PM org.netbeans.api.java.source.TreeUtilities ensureCommentsMapped
WARNING: Comment automap requested for Tree not from the root compilation info. Please, make sure to call GeneratorUtilities.importComments before Treeutilities.getComments. Tree: private int i
Nov 24, 2011 2:00:31 PM org.netbeans.api.java.source.TreeUtilities ensureCommentsMapped
INFO: Caller
java.lang.Exception
	at org.netbeans.api.java.source.TreeUtilities.ensureCommentsMapped(TreeUtilities.java:228)
	at org.netbeans.api.java.source.GeneratorUtilities.copyComments(GeneratorUtilities.java:798)
Comment 1 Jan Lahoda 2011-11-24 13:17:28 UTC
Slight correction (as a note to myself): the GU.importComments will not mark the tree (/CommentSetImpl) correctly as "comments mapped" when it does not actually assign any comments to it.
Comment 2 Jan Lahoda 2011-12-09 16:21:14 UTC
*** Bug 206086 has been marked as a duplicate of this bug. ***
Comment 3 Jan Lahoda 2011-12-09 19:40:48 UTC
See bug #206086 for a user-level bug caused by the same root cause.

http://hg.netbeans.org/jet-main/rev/4c10e36e75c4
Comment 4 Quality Engineering 2011-12-10 12:06:07 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/4c10e36e75c4
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #205525: making sure that importComments marks the tree with the comments-mapped mark, even if there are no comments assigned to the particular tree.
Comment 5 Jiri Prox 2012-02-06 13:43:22 UTC
verified in trunk
Comment 6 Jan Lahoda 2012-02-06 21:52:13 UTC
release71_fixes:
http://hg.netbeans.org/releases/rev/9c9928cadad0
Comment 7 Quality Engineering 2012-02-08 02:34:10 UTC
Integrated into 'releases', will be available in build *201202072200* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/9c9928cadad0
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #205525: making sure that importComments marks the tree with the comments-mapped mark, even if there are no comments assigned to the particular tree.
(transplanted from 4c10e36e75c42cb3b6711276be3c8294c884582e)
Comment 8 Jiri Prox 2012-02-14 12:51:00 UTC
verified in patch1
Comment 9 Jiri Prox 2012-02-14 15:42:25 UTC
*** Bug 207791 has been marked as a duplicate of this bug. ***