On Tue, 8 Feb 2022 15:57:00 GMT, Alan Bateman <[email protected]> wrote:
>> src/java.base/share/classes/java/util/jar/JarFile.java line 871:
>>
>>> 869: }
>>> 870: // ZipEntry::getName should not return null
>>> 871: if(ze.getName() != null) {
>>
>> Nit, add space after "if"
>
> if ZipEntry is extended and getName() overridden then you can't trust the
> name. So I think you'll have extract the name rather than calling
> ZipEntry::getName twice. I'm almost tempted to have getInputStream(ZipEntry)
> be re-specified to throw IAE if the zip entry name is null.
Ah, yes - good catch!
-------------
PR: https://git.openjdk.java.net/jdk/pull/7348