MMTx Detailed Trouble Report
(Trouble Report #213)



FieldField Data
ID213
CategorymmtxT
SynopsisNull Pointer exception when Candidate.getMatchedLexicalElements() used
Severityserious
Prioritymedium
Responsibleguy
Stateclosed
Classsw-bug
Arrival-DateWed Aug 24 13:42:00 EDT 2005
Closed-DateTue Jul 29 14:13:19 EDT 2008
ReleaseMMTx V2.4.B
Environmentall
DescriptionLine 647 of Candidate.java in gov/nih/nlm/nls/nlp/textfeatures implicitly assumes that variants have already been calculated earlier. I tried grabbing lexical elements from candidates and ran into the null pointer exception, made more annoying since I foolishly started a job last night thinking it would work. It would be best to remove the method from public access or to initalize the variants.
How-To-Repeat---
NotesThis happens when the method getMatchedLexicalElements() is called. This method assumes that the --matchMapNeeded flag is set to true - so that the matchedVariants are accumulated. When the --matchedMapNeeded flag is not set, those pointers are not kept track of, and if this method is called, the method will cause a null pointer exception.

The fix involved adding null pointer check, and adding documenation to clarify when this method is to be used.


Contact Us    |   Copyright, Privacy, and Disclaimer Notice    |   Accessibility   ]