Skip to content

Commit

Permalink
Use ASTHelpers.getFileNameFromUri
Browse files Browse the repository at this point in the history
  • Loading branch information
Gautam Korlam committed Nov 1, 2017
1 parent 5818c2c commit 51c422b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.google.common.base.Throwables;
import com.google.errorprone.scanner.ErrorProneScannerTransformer;
import com.google.errorprone.scanner.ScannerSupplier;
import com.google.errorprone.util.ASTHelpers;
import com.sun.source.tree.CompilationUnitTree;
import com.sun.source.tree.Tree;
import com.sun.source.util.TaskEvent;
Expand Down Expand Up @@ -172,7 +173,7 @@ public void finished(TaskEvent taskEvent) {
*/
private boolean isExcludedPath(URI uri) {
Pattern excludedPattern = errorProneOptions.getExcludedPattern();
return (excludedPattern != null) && excludedPattern.matcher(uri.toString()).matches();
return (excludedPattern != null) && excludedPattern.matcher(ASTHelpers.getFileNameFromUri(uri)).matches();
}

/**
Expand Down

0 comments on commit 51c422b

Please sign in to comment.