File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,15 +29,7 @@ public Object fault(Object target, ILookupHost host){
2929 }
3030 else if (target instanceof ILookup )
3131 {
32- final Class c = target .getClass ();
33- host .swapThunk (n ,new ILookupThunk (){
34-
35- public Object get (Object target ){
36- if (target != null && target .getClass () == c )
37- return ((ILookup ) target ).valAt (k );
38- return this ;
39- }
40- });
32+ host .swapThunk (n ,ilookupThunk (target .getClass ()));
4133 return ((ILookup ) target ).valAt (k );
4234 }
4335 host .swapThunk (n ,this );
@@ -50,9 +42,24 @@ public Object get(Object target){
5042 return RT .get (target ,k );
5143}
5244
45+ private ILookupThunk ilookupThunk (final Class c ){
46+ return new ILookupThunk (){
47+ public Object get (Object target ){
48+ if (target != null && target .getClass () == c )
49+ return ((ILookup ) target ).valAt (k );
50+ return this ;
51+ }
52+ };
53+ }
54+
5355private Object install (Object target , ILookupHost host ){
5456 ILookupThunk t = ((IKeywordLookup )target ).getLookupThunk (k );
55- host .swapThunk (n ,t );
56- return t .get (target );
57+ if (t != null )
58+ {
59+ host .swapThunk (n ,t );
60+ return t .get (target );
61+ }
62+ host .swapThunk (n ,ilookupThunk (target .getClass ()));
63+ return ((ILookup ) target ).valAt (k );
5764}
5865}
You can’t perform that action at this time.
0 commit comments