You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Thilo Goetz (JIRA)" <ui...@incubator.apache.org> on 2007/11/21 10:53:43 UTC

[jira] Commented: (UIMA-643) TypeSystemUtil.type2TypeDescription() throws NPE when the superType is null

    [ https://issues.apache.org/jira/browse/UIMA-643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12544395 ] 

Thilo Goetz commented on UIMA-643:
----------------------------------

I'm not sure I agree with this patch.  Sure, throwing a NPE is not ideal.  However, the only type that doesn't have a parent is uima.cas.TOP.  Calling type2TypeDescription() on TOP doesn't make sense to me since you can't read the description back in (you're not allowed to redefine TOP).  If you look at the way type2TypeDescription() is used in the same file, you'll see what I mean.

I'd suggest to update the javadoc to indicate that type2TypeDescription should not be called on built-in types and maybe throw a dedicated exception.


> TypeSystemUtil.type2TypeDescription() throws NPE when the superType is null
> ---------------------------------------------------------------------------
>
>                 Key: UIMA-643
>                 URL: https://issues.apache.org/jira/browse/UIMA-643
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.2.1
>         Environment: Occurs in WIndows
>            Reporter: Tong Fin
>            Priority: Minor
>             Fix For: 2.2.1
>
>         Attachments: TypeSystemUtil_patch-11-20-2007.txt
>
>
> If the "aType" type does NOT have superType, the method TypeSystemUtil.type2TypeDescription(Type aType, TypeSystem aTypeSystem) throwa a NULL pointer exception.

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