File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
src/net/sf/j2s/core/astvisitors Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -956,18 +956,20 @@ public boolean visit(MethodInvocation node) {
956
956
optionals .add (qn );
957
957
}
958
958
}
959
-
960
- //the ofllowing fix introduces an error... reverting fix until a solution is found
961
- //sgurin: fix for bug http://sourceforge.net/tracker/?func=detail&aid=3037341&group_id=155436&atid=795800
962
- //in a static method call, if the mehthod's type is not this class, we require it.
963
- // String methodOwnerClassName = resolveMethodBinding.getDeclaringClass().getQualifiedName();
964
- // if(methodOwnerClassName!=null && !methodOwnerClassName.equals(Bindings.getBindingOfParentType(node).getQualifiedName())) {
965
- // requires.add(methodOwnerClassName);
966
- // }
959
+ //sgurin bugfix for http://sourceforge.net/tracker/?func=detail&aid=3037341&group_id=155436&atid=795800
960
+ else if (expression == null ) { //statically imported method invocation
961
+ QNTypeBinding qn = new QNTypeBinding ();
962
+ String qualifiedName = resolveMethodBinding .getDeclaringClass ().getQualifiedName ();
963
+ if (qualifiedName != null && isQualifiedNameOK (qualifiedName , node )) {
964
+ qn .qualifiedName = qualifiedName ;
965
+ if (!musts .contains (qn ) && !requires .contains (qn )) {
966
+ optionals .add (qn );
967
+ }
968
+ }
969
+ }
967
970
}
968
971
return super .visit (node );
969
972
}
970
-
971
973
public boolean isDebugging () {
972
974
return isDebugging ;
973
975
}
You can’t perform that action at this time.
0 commit comments