You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ctakes.apache.org by "Pei Chen (JIRA)" <ji...@apache.org> on 2013/09/09 16:25:51 UTC
[jira] [Created] (CTAKES-241) NullPointerException in
ctakes-assertion
Pei Chen created CTAKES-241:
-------------------------------
Summary: 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
Reporter: Pei Chen
Fix For: 3.2
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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira