ctakes-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pei Chen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CTAKES-241) NullPointerException in ctakes-assertion
Date Mon, 30 Jun 2014 18:35:26 GMT

     [ https://issues.apache.org/jira/browse/CTAKES-241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pei Chen updated CTAKES-241:
----------------------------

    Fix Version/s:     (was: 3.2.0)
                   3.2.1

> NullPointerException in ctakes-assertion 
> -----------------------------------------
>
>                 Key: CTAKES-241
>                 URL: https://issues.apache.org/jira/browse/CTAKES-241
>             Project: cTAKES
>          Issue Type: Bug
>          Components: ctakes-assertion
>    Affects Versions: 3.1.0
>            Reporter: Pei Chen
>             Fix For: 3.2.1
>
>
> Assertion module throws an NullPointerException if sentence is null:
> I do not full understand ~171, there is a null check, but it doesn't do much other than
the log.  Subsequently, once it hits,  int lineNumber = sentence.getSentenceNumber() + 1,
it will throw an NPE.
> Should the else{} cover the rest of the method?
> org.apache.ctakes.assertion.medfacts.i2b2.api.CharacterOffsetToLineTokenConverterCtakesImpl.convertCharacterOffsetToLineToken(CharacterOffsetToLineTokenConverterCtakesImpl.java:171)
>     Sentence sentence = findPreviousOrCurrentSentence(characterOffset);
>     if (sentence == null)
>     {
>     	logger.info("current or previous sentence IS NULL!");
>     } else
>     {
>     	logger.debug("current or previous sentence -- id: " + sentence.getAddress() +
>     			"; begin: " + sentence.getBegin() + 
>     			"; end: " + sentence.getEnd());
>     }
>     
>     int lineNumber = sentence.getSentenceNumber() + 1;



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message