elharo opened a new issue, #99:
URL: https://github.com/apache/maven-jarsigner/issues/99
The Javadoc for `isZipFile()` states the parameter "must not be null", but
there is no null check. Passing `null` causes `Files.newInputStream(null)` to
throw NPE, which is silently caught, so `isZipFile(null)` returns `false`
instead of throwing `NullPointerException` as the contract implies.
**File:** `JarSignerUtil.java:57`
**Suggested fix:** Add an explicit null check at the start of the method:
```java
public static boolean isZipFile(final File file) {
if (file == null) {
throw new NullPointerException("file");
}
// ... rest of method
}
```
--
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]