uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörn Kottmann (JIRA) <uima-...@incubator.apache.org>
Subject [jira] Commented: (UIMA-1478) possible NullPointerException on CASInitializer
Date Thu, 06 Aug 2009 13:47:14 GMT

    [ 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.


Mime
View raw message