Skip to content

Commit

Permalink
minor adjustments based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
daanschipper committed Feb 19, 2018
1 parent 35fe240 commit 829d340
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -40,14 +40,15 @@
import java.util.Optional; import java.util.Optional;
import java.util.Set; import java.util.Set;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger;


import static com.github.javaparser.utils.Utils.assertNotNull; import static com.github.javaparser.utils.Utils.assertNotNull;
import static java.nio.file.FileVisitResult.CONTINUE; import static java.nio.file.FileVisitResult.CONTINUE;
import static java.nio.file.FileVisitResult.SKIP_SIBLINGS; import static java.nio.file.FileVisitResult.SKIP_SIBLINGS;


public class SymbolSourceRoot { public class SymbolSourceRoot {


private static java.util.logging.Logger logger = java.util.logging.Logger.getLogger(JavaParserFacade.class.getCanonicalName()); private static Logger logger = Logger.getLogger(JavaParserFacade.class.getCanonicalName());


private final Path root; private final Path root;
private CombinedTypeSolver typeSolver = new CombinedTypeSolver(new ReflectionTypeSolver(false)); private CombinedTypeSolver typeSolver = new CombinedTypeSolver(new ReflectionTypeSolver(false));
Expand All @@ -69,10 +70,9 @@ public TypeSolver walk() throws IOException {


public Optional<TypeSolver> tryToWalk() { public Optional<TypeSolver> tryToWalk() {
try { try {
Files.walkFileTree(root, new JavaSymbolSolverWalker()); return Optional.of(walk());
Files.walkFileTree(root, new JarVisitor());
return Optional.of(typeSolver);
} catch (IOException e) { } catch (IOException e) {
logger.log(Level.WARNING, "Unable to walk root " + root, e);
return Optional.empty(); return Optional.empty();
} }
} }
Expand Down

0 comments on commit 829d340

Please sign in to comment.