Skip to content

Commit c2a48f5

Browse files
authored
Update regex to allow empty directory names
1 parent 3b9b51c commit c2a48f5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • rewrite-test/src/main/java/org/openrewrite/test

rewrite-test/src/main/java/org/openrewrite/test/Dir.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class Dir implements Iterable<SourceSpec<?>>, SourceSpecs {
3030

3131
public Dir(String dir, Consumer<SourceSpec<SourceFile>> spec, SourceSpecs... sourceSpecs) {
3232
// Prevent invalid paths such as `<project>` passed into `mavenProject(...)` where `pomXml` should be used
33-
if (!dir.matches("[- \\w/\\\\]+")) {
33+
if (!dir.matches("[- \\w/\\\\]*")) {
3434
throw new IllegalArgumentException("Invalid directory: " + dir);
3535
}
3636
this.dir = dir;

0 commit comments

Comments
 (0)