apache / apache/maven-jarsigner-plugin
decrypt() error message omits context from SecDispatcherException
- Dominant language
- Java
- Stars
- 23
- Forks
- 18
- Avg merge
- 4h 23m
- Merged PRs (30d)
- 2
Description
**Affected version:** HEAD
**File:** `src/main/java/org/apache/maven/plugins/jarsigner/AbstractJarsignerMojo.java:560-567`
The `decrypt()` method logs the error and re-throws, but the root cause details from `SecDispatcherException` may be partially lost:
```java
protected String decrypt(String encoded) throws MojoExecutionException {
try {
return securityDispatcher.decrypt(encoded);
} catch (SecDispatcherException e) {
getLog().error("error using security dispatcher: " + e.getMessage(), e);
throw new MojoExecutionException("error using security dispatcher: " + e.getMessage(), e);
}
}
```
The exception is passed as the cause to `MojoExecutionException`, so details are preserved in the chain. However, the error message string uses `e.getMessage()` which may omit important context (like the password key that failed to decrypt). Consider including more context in the message.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with decrypt() in src/main/java/org/apache/maven/plugins/jarsigner/AbstractJarsignerMojo.java:560-567 and trace the SecDispatcherException message and cause handling. Check the resulting Maven plugin error output for preserved decryption context; the work is done when the reported error retains the relevant root-cause details without losing the exception chain.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100