Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 58941 - ProxyLookup caches Templates
ProxyLookup caches Templates
Status: CLOSED FIXED
Product: platform
Classification: Unclassified
Component: Lookup
4.x
All All
: P3 (vote)
: 5.x
Assigned To: Jaroslav Tulach
issues@platform
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-16 09:35 UTC by Martin Roskanin
Modified: 2008-12-22 15:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
ProxyLookupTest diff (2.55 KB, text/plain)
2005-05-16 09:36 UTC, Martin Roskanin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Roskanin 2005-05-16 09:35:05 UTC
Reproduction:
- create ProxyLookup with one lookup that contains one object i.e. String
- perform lookup via Template of String.class
- replace lookup in ProxyLookup. New lookup will contain one object i.e Integer
- perform lookup via Tempate of String.class
-> instance of String.class is found, although it already shouldn't be presented
in ProxyLookup

For more details, see attached test diff
Comment 1 Martin Roskanin 2005-05-16 09:36:35 UTC
Created attachment 22140 [details]
ProxyLookupTest diff
Comment 2 Jaroslav Tulach 2005-06-12 16:45:06 UTC
cvs -q ci -m "#58941: The array passed to setLookups was thought as not 
modifiable and if someone modified it and setLookups once again things were 
obviously broken. Making clone of the array in setLookups and also creating 
clone in getLookups. Testing both cases." 
 
 
Checking in src/org/openide/util/lookup/ProxyLookup.java; 
/cvs/openide/util/src/org/openide/util/lookup/ProxyLookup.java,v  <--  
ProxyLookup.java 
new revision: 1.2; previous revision: 1.1 
done 
Checking in test/unit/src/org/openide/util/lookup/ProxyLookupTest.java; 
/cvs/openide/util/test/unit/src/org/openide/util/lookup/ProxyLookupTest.java,v  
<--  ProxyLookupTest.java 
new revision: 1.2; previous revision: 1.1 
 
Comment 3 Martin Roskanin 2005-06-17 14:28:23 UTC
Verified. Thanks.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo