File tree Expand file tree Collapse file tree
sources/net.sf.j2s.core/src/net/sf/j2s/core/astvisitors Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -956,11 +956,17 @@ public boolean visit(MethodInvocation node) {
956956 optionals .add (qn );
957957 }
958958 }
959- //the ofllowing fix introduces an error... reverting fix until a solution is found
960- // //sgurin: fix for bug http://sourceforge.net/tracker/?func=det ail&aid=3037341&group_id=155436&atid=795800
961- // String methodOwnerClassName = resolveMethodBinding.getDeclaringClass().getQualifiedName();
962- // if(methodOwnerClassName!=null && !methodOwnerClassName.equals(""))
963- // requires.add(methodOwnerClassName);
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+ }
964970 }
965971 return super .visit (node );
966972 }
You can’t perform that action at this time.
0 commit comments