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 250312 - Organize imports fails on trailing comments in class body
Summary: Organize imports fails on trailing comments in class body
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-09 17:18 UTC by Exceptions Reporter
Modified: 2015-08-06 09:22 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 215295


Attachments
stacktrace (5.55 KB, text/plain)
2015-02-09 17:18 UTC, Exceptions Reporter
Details
Information you requested (97.38 KB, application/x-zip-compressed)
2015-07-25 20:46 UTC, dbcurtis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2015-02-09 17:18:47 UTC
This bug was originally marked as duplicate of bug 240803, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 8.0.2 (Build 201411181905)
VM: Java HotSpot(TM) Client VM, 25.0-b70, Java(TM) SE Runtime Environment, 1.8.0-b132
OS: Windows 7

User Comments:
GUEST: Este erro ocoreeu despois que apaguei um linha de c
Comment 1 Exceptions Reporter 2015-02-09 17:18:49 UTC
Created attachment 151904 [details]
stacktrace
Comment 2 Exceptions Reporter 2015-07-20 19:04:37 UTC
This bug already has 50 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=215295
Comment 3 Jaroslav Havlin 2015-07-21 05:42:57 UTC
Seems similar to bug 240803.
Reassigning to java/Source. Please evaluate. Thank you.
Comment 4 Svata Dedic 2015-07-23 10:38:47 UTC
It's not a P1: the error is caused by "Organize Members" hint enabled in the editor.

Reporters - I need your java formatting settings. If you see the error again, *please* do these additional steps:

1/ copy the file being edited as it is stored on the disk (without possible unsaved modifications)
2/ copy the editor's contents (do not save the file, but rather copy/paste whole editor contents to a new file)
3/ export your options (Tools - Options / Export, categories java, editor)

Zip it all up with the message.log and attach here, or at least note what exception report the zip with source files belongs to.

The error seems to be caused by trailing line comments at the end of the class, but I am not able to reproduce the defect using sources supplied in the log files: some CR/LF magic may be in effect (that's why I would like to see the unchanged file on the hdd).

Thanks for feedback.
Comment 5 dbcurtis 2015-07-25 20:46:48 UTC
Created attachment 154888 [details]
Information you requested
Comment 6 Svata Dedic 2015-08-06 09:22:34 UTC
I'm terribly sorry - still I cannot reproduce. I've took the file, created stubs for referenced classes, so the sample code is error-free ... still no luck. Sorry.

Closing as worksforme - please try the 8.1 beta (released today?), which contains additional fixes in code generator (and surely other bugs, too).