8225037: java.net.JarURLConnection::getJarEntry() throws NullPointerException

Reviewed-by: coffeys, vtewari
This commit is contained in:
Chris Hegarty 2019-06-05 13:59:44 +01:00
parent 04c0750041
commit cc353da44d
2 changed files with 192 additions and 1 deletions

View file

@ -254,7 +254,7 @@ public abstract class JarURLConnection extends URLConnection {
* @see #getJarEntry
*/
public JarEntry getJarEntry() throws IOException {
return getJarFile().getJarEntry(entryName);
return entryName == null ? null : getJarFile().getJarEntry(entryName);
}
/**