Skip to content

Commit

Permalink
20240524
Browse files Browse the repository at this point in the history
  • Loading branch information
thevpc committed May 24, 2024
1 parent e0765b6 commit 9bd48de
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private NStream<NPath> stream(NPath r, PathPart[] parts, int from) {
} else {
int i0 = i;
NFunction<NPath, NStream<NPath>> f = NFunction.of((NPath x) -> stream(x, parts, i0 + 1)).withDesc(NEDesc.of("subStream"));
return t.flatMap((NFunction) f);
return t.flatMapStream((NFunction) f);
}
} else if (parts[i] instanceof SubPathWildCardPathPart) {
SubPathWildCardPathPart w = (SubPathWildCardPathPart) parts[i];
Expand All @@ -135,7 +135,7 @@ private NStream<NPath> stream(NPath r, PathPart[] parts, int from) {
int i0 = i;

NFunction<NPath, NStream<NPath>> f = NFunction.of((NPath x) -> stream(x, parts, i0 + 1)).withDesc(NEDesc.of("subStream"));
return t.flatMap((NFunction) f).distinct();
return t.flatMapStream((NFunction) f).distinct();
}
} else {
throw new NIllegalArgumentException(session, NMsg.ofC("unsupported %s",parts[i]));
Expand Down Expand Up @@ -193,7 +193,7 @@ public SubPathWildCardPathPart(String value) {
}

public boolean matchesSubPath(NPath subPath) {
return pattern.matcher(subPath.toString()).matches();
return pattern.matcher((subPath==null?"":subPath.toString())).matches();
}

@Override
Expand Down

0 comments on commit 9bd48de

Please sign in to comment.