On 25/03/2016 18:46, Chris Hegarty wrote:
Take 2.

InvalidJarIndexException is thrown when an index is corrupt. It is a useful 
piece of
information that the deployment of the jar files, on the class path, with 
indices, are
"bad". It is really an Error. It indicates a serious problem with the 
deployment that a
reasonable application should not try to handle.

Propose...

1) Update the Jar File Specification [1] ( 8152276 [2] ):

    "Once the class loader finds a INDEX.LIST file in a particular jar file, it 
always trusts
     the information listed in it. If a mapping is found for a particular 
class, but the class
     loader fails to find it by following the link,  ** an unspecified Error or 
RuntimeException **
     is thrown. When this occurs, the application developer should rerun the 
jar tool on the
     extension to get the right information into the index file."

   2) Update the implementation to throw an ( unspecified ) Error. ( 8152190 
[3] )
No user code should every catch or try to handle this Error.
      No user code should every have tried to catch or handle 
InvalidJarIndexException
Webrev:
   http://cr.openjdk.java.net/~chegar/8152190/00/

This looks good. I doubt anything could have dependent on the previous specified behavior as the exception wasn't fully qualified and also unpredictable as to when it might be thrown.

-Alan.

Reply via email to