Re: BlockInfoReader.java patch

Peter Donald <peter-4lf8KW9E9MLMqX/[email protected]>
Newsgroups gmane.comp.java.jcontainer.interest
Message-ID <[email protected]>
Hi,

On Wed, 29 Oct 2003 11:39 am, Mircea Toma wrote:
> This is a patch for
> org\jcontainer\loom\components\util\infobuilder\BlockInfoReader.java class.
> Modified the code to avoid NPE when a value is not provided for
> @dna.dependency key="*".
> Modified the code to avoid NPE when a value is not provided for
> @dna.dependency optional="true/false".

Neither of those values should ever be null - can you tell me how you 
generated the MetaClass descriptors that ended up with nulls in them. 

Both the tasks

org.jcontainer.loom.info.GenerateLoomDescriptorsTask
org.jcontainer.dna.tools.metaclass.GenerateDNADescriptorsTask

explicitly populate default values. These tools also do basic checking to 
verify that the metadata is correct.

In the future the ComponentVerifier will explicitly check the components 
metadata and reject classes that fail to provide the correct metadata. 
(However this has not yet been reintegrated into Loom).

In the meantime it may be good just to apply this patch anyways but I am 
curious about how you generated the descriptors.

-- 
Cheers,

Peter Donald
*----------------------------------------------*
| "Always forgive your enemies. Nothing annoys |
|          them more." -Oscar Wilde            |
*----------------------------------------------*
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.