Hi Chris,
 
Change looks OK to me as method specifications tells " This  method returns null if the JAR file URL corresponding to this  connection points to a JAR file and not a JAR file entry."
 
Thanks,
Vyom
 
----- Original message -----
From: Chris Hegarty <chris.hega...@oracle.com>
Sent by: "net-dev" <net-dev-boun...@openjdk.java.net>
To: OpenJDK Network Dev list <net-dev@openjdk.java.net>
Cc:
Subject: [EXTERNAL] RFR [13] 8225037: java.net.JarURLConnection::getJarEntry() throws NullPointerException
Date: Fri, May 31, 2019 4:29 PM
 
The implementation of java.net.JarURLConnection has a private String,
`entryName`, that is used to hold the optional jar file entry name. If
the  JAR file URL corresponding to the JarURLConnection points to a JAR
file and not a JAR file entry, then `entryName` will be `null` ( which
should be ok ).

The default implementation of JarURLConnection::getJarEntry should only
invoke `getJarEntry(entryName)` if the name is non-null. ( This is not
an issue in the built-in JarURLConnection handler implementation, as it
already correctly handles a null `entryName` )

https://cr.openjdk.java.net/~chegar/8225037/webrev.00/

-Chris.

 
 

Reply via email to