Thanks for the heads up about this. I didn't apply this patch directly - 
instead I made sure that nulls are never passed to Extension class by 
modifying DefaultClassLoader to check for nulls before checking extensions.

So hopefully the latest Phoenix should work for you now. If it doesn't just 
give us a yell and we will fix it ;)

Thanks again.

At 08:13 PM 6/27/2002 -0700, you wrote:
>I was trying to fit a prewritten module that I had in Phoenix [make a block
>out of it]. This particular module has a lot of dependencies of other
>thirdparty jars (like jdbc stuff etc.). While playing with it I realized
>that if a third party jar is deployed in the sar file for the block which
>does not have a manifest in it Phoenix gives a null pointer exception and
>exits.
>A little analysis showed that the getListed function in the Extension.java
>of the Extension package of Excalibur did not check for a null in the
>manifest entry passed to it and was throwing a null pointer if so. Just a
>check for null fixed it.
>
>Here is the code I modified -
>
>     /**
>      * Retrieve all the extensions listed under a particular key
>      * (Usually EXTENSION_LIST or OPTIONAL_EXTENSION_LIST).
>      *
>      * @param manifest the manifest to extract extensions from
>      * @param listKey the key used to get list (Usually
>      *        EXTENSION_LIST or OPTIONAL_EXTENSION_LIST)
>      * @return the list of listed extensions
>      */
>     private static Extension[] getListed( final Manifest manifest,
>                                           final Attributes.Name listKey )
>     {
>         final ArrayList results = new ArrayList();
> >>        if( null != manifest)
> >>        {
>             final Attributes mainAttributes = manifest.getMainAttributes();
>
>             if( null != mainAttributes )
>             {
>                 getExtension( mainAttributes, results, listKey );
>             }
>
>             final Map entries = manifest.getEntries();
>             final Iterator keys = entries.keySet().iterator();
>             while( keys.hasNext() )
>             {
>                 final String key = (String)keys.next();
>                 final Attributes attributes = (Attributes)entries.get( key
>);
>                 getExtension( attributes, results, listKey );
>             }
> >>        }
>         return (Extension[])results.toArray( new Extension[ 0 ] );
>     }
>
>Atul.
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Cheers,

Peter Donald
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Faced with the choice between changing one's mind,
and proving that there is no need to do so - almost
everyone gets busy on the proof."
              - John Kenneth Galbraith
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to