apache / apache/maven-ear-plugin
InterpolationException silently swallowed in AbstractEarModule.getBundleFileName()
- Dominant language
- Java
- Stars
- 14
- Forks
- 29
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 6
Description
## Description
In `AbstractEarModule.java:268-271`, an `InterpolationException` from `MappingUtils.evaluateFileNameMapping()` is silently swallowed:
```java
} catch (InterpolationException e) {
// We currently ignore this here
// FIXME: should we handle this better?
}
```
If the file name mapping evaluation fails, the exception is completely ignored. The `bundleFileName` field remains `null`, and downstream code using `getUri()` (which calls `getBundleFileName()`) may get unexpected null values. The FIXME comment confirms this is a known issue.
## Expected behavior
At minimum, log a warning:
```java
} catch (InterpolationException e) {
getLog().warn("Failed to evaluate file name mapping", e);
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Open AbstractEarModule.java at lines 268-271 and trace getBundleFileName() through getUri(); inspect how MappingUtils.evaluateFileNameMapping() failures and nearby logging are handled. Run the relevant existing tests, then verify that an InterpolationException is no longer silently ignored and that downstream callers do not receive an unexpected null without a warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100