Skip to content

Commit

Permalink
Recovered inadvertently exiled unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
jsight committed Jun 19, 2014
1 parent 07cd553 commit acd70d1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
import org.jboss.windup.graph.GraphContext;
import org.jboss.windup.rules.apps.java.scan.dao.JavaClassDao;
import org.jboss.windup.rules.apps.java.scan.model.JavaClassModel;
import org.jboss.windup.graph.model.resource.FileModel;
import org.jboss.windup.rules.apps.java.scan.ast.event.JavaScannerASTEvent;
import org.jboss.windup.rules.apps.java.scan.dao.JavaClassDao;
import org.jboss.windup.rules.apps.java.scan.model.JavaClassModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -97,12 +97,31 @@ public class VariableResolvingASTVisitor extends ASTVisitor
*/
private final Map<String, String> classNameToFQCN = new HashMap<>();

/**
* Maintains a set of all variable names that have been resolved
*/
private final Set<String> names = new HashSet<String>();

/**
* Maintains a map of nameInstances to fully qualified class names.
*/
private final Map<String, String> nameInstance = new HashMap<String, String>();

private FileModel fileModel;

public void init(CompilationUnit cu, FileModel fileModel)
{
this.cu = cu;
this.fileModel = fileModel;
this.wildcardImports.clear();
this.classNameLookedUp.clear();
this.classNameToFQCN.clear();
this.names.clear();
this.nameInstance.clear();

String packageName = cu.getPackage().getName().getFullyQualifiedName();
this.names.add("this");
this.nameInstance.put("this", packageName);
}

private void fireJavaScannerEvent(ClassCandidate classCandidate)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public class VariableResolvingASTVisitorTest
@AddonDependency(name = "org.jboss.windup.graph:windup-graph"),
@AddonDependency(name = "org.jboss.windup.rules.apps:rules-java"),
@AddonDependency(name = "org.jboss.forge.furnace.container:cdi"),

})
public static ForgeArchive getDeployment()
{
Expand Down

0 comments on commit acd70d1

Please sign in to comment.