You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrew Cornwall (JIRA)" <ji...@apache.org> on 2008/02/12 17:15:09 UTC

[jira] Updated: (HARMONY-5489) [pack200][classlib] java.util.ZipException("No Entries") on unpack close()

     [ https://issues.apache.org/jira/browse/HARMONY-5489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Cornwall updated HARMONY-5489:
-------------------------------------

    Summary: [pack200][classlib] java.util.ZipException("No Entries") on unpack close()  (was: [pack200][classlib] ClassBands.getCodeHandlerClassRCN() sometimes contains nulls?)

Using Archive.unpack(), the same test case throws:

Thread [main] (Suspended (exception ZipException))	
	JarOutputStream(ZipOutputStream).finish() line: 159	
	JarOutputStream(ZipOutputStream).close() line: 59	
	Archive.unpack() line: 153	
	TestUnpack.main(String[]) line: 15	



> [pack200][classlib] java.util.ZipException("No Entries") on unpack close()
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5489
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5489
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: All Pack200
>            Reporter: Andrew Cornwall
>            Assignee: Sian January
>         Attachments: mypack.pack
>
>
> The ClassBands.getCodeHandlerClassRCN() method answers an array of arrays of Strings (which is stored as handlerClassTypes in BcBands.unpack). That structure sometimes contains what appear to be inappropriate nulls, which leads to the following code failing:
> (from BcBands.unpack()):
>                     if(handlerCount != null) {
>                         for (int j = 0; j < handlerCount[i]; j++) {
>                             String handlerClass = handlerClassTypes[i][j];
>                             CPClass cpHandlerClass = new CPClass(handlerClass);
>                             ExceptionTableEntry entry = new ExceptionTableEntry(
>                                     handlerStartPCs[i][j], handlerEndPCs[i][j],
>                                     handlerCatchPCs[i][j], cpHandlerClass);
>                             exceptionTable.add(entry);
>                         }
> handlerClassTypes[i][j] can be null, which means that handlerClass is null. The code then fails when trying to create a new CPClass(null).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.