You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Jörn Kottmann (JIRA)" <ui...@incubator.apache.org> on 2009/08/06 15:47:14 UTC

[jira] Commented: (UIMA-1478) possible NullPointerException on CASInitializer

    [ https://issues.apache.org/jira/browse/UIMA-1478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740066#action_12740066 ] 

Jörn Kottmann commented on UIMA-1478:
-------------------------------------

We are speaking here about test code and I do not agree that returning null instead of throwing a NPE improves the situation.
I searched the test code for invocations of the method in question and at many places the returned cas was accessed just after
it was created to get a reference to its Type System. Though in some places it was not accessed directly, which means that these 
tests would fail later and not at the place of the actual cause, which I think should be avoided.


> possible NullPointerException on CASInitializer
> -----------------------------------------------
>
>                 Key: UIMA-1478
>                 URL: https://issues.apache.org/jira/browse/UIMA-1478
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.2.2
>         Environment: MacOSX 10.5
>            Reporter: Tommaso Teofili
>             Fix For: 2.3S
>
>         Attachments: patch1478.txt
>
>
> code at lline 69
> return casMgr.getCAS().getCurrentView();
> could raise a not handled NPE on casMgr and getCAS()

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