gnodet-bot commented on code in PR #444:
URL: https://github.com/apache/maven-filtering/pull/444#discussion_r4592865649
##########
src/main/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFiltering.java:
##########
@@ -273,7 +272,7 @@ private File getTargetFile(File file) throws
MavenFilteringException {
String origin = basedir.relativize(
resourceDirectory.getAbsoluteFile().toPath())
.toString();
- if (StringUtils.isEmpty(origin)) {
+ if (origin == null || origin.isEmpty()) {
Review Comment:
💡 **Minor:** `origin == null` is dead code —
`Path.relativize(Path).toString()` always returns a non-null `String` per the
Java API contract. When both paths are equal, `relativize()` returns an empty
path (not null), so `.toString()` returns `""`.
The check can be simplified to just:
```suggestion
if (origin.isEmpty()) {
```
This is harmless as defensive programming, so it does not block approval.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]