Skip to content

Commit bcefa49

Browse files
committed
fix a minor bug in processing regex
Signed-off-by: Pranav Gaikwad <pgaikwad@redhat.com>
1 parent 4d90609 commit bcefa49

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

java-analyzer-bundle.core/src/main/java/io/konveyor/tackle/core/internal/SampleDelegateCommandHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,8 @@ private static List<SymbolInformation> search(String projectName, ArrayList<Stri
376376

377377
// Now run ImportScanner only on units in scope
378378
ASTParser parser = ASTParser.newParser(AST.getJLSLatest());
379-
Pattern regex = Pattern.compile(query);
379+
// when creating the regex, replace * with .*
380+
Pattern regex = Pattern.compile(query.replaceAll("(?<!\\.)\\*", ".*"));
380381
for (ICompilationUnit unit : units) {
381382
parser.setSource(unit);
382383
CompilationUnit cu = (CompilationUnit) parser.createAST(null);

0 commit comments

Comments
 (0)