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 50032 - IllegalArgumentException from editor
Summary: IllegalArgumentException from editor
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Petr Nejedly
URL:
Keywords: RANDOM
: 48885 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-06 17:10 UTC by ehucka
Modified: 2008-12-23 00:37 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stacktrace (619 bytes, text/plain)
2004-10-06 17:11 UTC, ehucka
Details
Fix with a basic test (22.50 KB, patch)
2004-10-14 13:28 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ehucka 2004-10-06 17:10:30 UTC
I've only moved a cursor in editor, in this moment
the code was valid and saved.
Comment 1 ehucka 2004-10-06 17:11:05 UTC
Created attachment 18098 [details]
stacktrace
Comment 2 Jaroslav Tulach 2004-10-13 16:09:30 UTC
ehucka: You probably moved your cursor in java file. That is likely to
be bug in java, as openide is not reponsible for someone trying to
select a node that is not under root of an explorer.
Comment 3 Martin Matula 2004-10-13 23:34:16 UTC
I have no idea how to find the cause of this bug having just this
short stacktrace. What file were you editing? Did it contain JDK 1.5
features (like enums or annotations)? I am asking because we had a bug
which caused that nodes that were not in the explorer were set as active.
Yarda, could you please explain better, what the exception means/how
we could find out what the cause could be?
Comment 4 Jaroslav Tulach 2004-10-14 13:24:30 UTC
I am suspicious against bugs just assigned to core when they happen
somewhere else, however in this case I am really not aware of any
possible fix in java module.
Comment 5 Jaroslav Tulach 2004-10-14 13:26:30 UTC
Imho the problem is in wrong synchronization of ExplorerManager. It
checks whether its nodes are under root, then it calls
setSelectedNodes where the check is done one more and it fails. I
suggest to wrap all code like this into Children.MUTEX.readAccess.
Comment 6 Jaroslav Tulach 2004-10-14 13:28:41 UTC
Created attachment 18294 [details]
Fix with a basic test
Comment 7 Petr Nejedly 2004-10-20 14:24:08 UTC
Integrated after a bit of refactoring.

openide/src/org/openide/explorer/ExplorerManager.java,v1.49
openide/test/unit/src/org/openide/explorer/ExplorerManagerTest.java,v1.1

Comment 8 Petr Nejedly 2004-10-26 14:26:00 UTC
*** Issue 48885 has been marked as a duplicate of this issue. ***
Comment 9 ehucka 2004-11-08 14:43:14 UTC
verified