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) {
956956 optionals .add (qn );
957957 }
958958 }
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+ }
967970 }
968971 return super .visit (node );
969972 }
970-
971973 public boolean isDebugging () {
972974 return isDebugging ;
973975 }
You can’t perform that action at this time.
0 commit comments