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.
If there is a node that implements its cookie directly: class N extends AbstractNode implements SaveCookie; then following code returns invalid results: new FilterNode (new N ()).getLookup ().lookup (SaveCookie.class); This is a general problem which demonstrated itself in issue 31743 which is P1 for 3.5
Test to demonstrate the behaviour: http://www.netbeans.org/source/browse/openide/test/unit/src/org/openide/nodes/NodeLookupTest.java.diff?r1=1.12&r2=1.13 and the fix: http://www.netbeans.org/source/browse/openide/src/org/openide/nodes/FilterNode.java.diff?r1=1.76&r2=1.77 The problem was in FilterNode always replacing the original node by itself in returned values. The fix makes difference between "node" query and other queries. The replacement of nodes is done only for "node" queries. That way, if somebody asks for SaveCookie, the original node is returned. Petr, I think that this is a serious issue and we might want to get it into 3.5. What do you think, can you do review?
Agree that this is a regression and should be fixed in the release35. Thus reopening and changing target milestone to 3.5 I think we can go with the current trunk version.
Created attachment 9680 [details] Proposed diff
Created attachment 9681 [details] Binary patch for 3.5 to try
Yarda please use -c or -u format for diffs. I just make a ~/.cvsrc: ---%<--- cvs -z3 update -d -P checkout -P diff -u tag -c ---%<---
I have tested the patch it on linux. It seems fine.
approved for 3.5.
Fixed in release 3.5 as well
x
fixed long time ago..... ...verified.... reopen if disagree