MMTx Detailed Trouble Report (Trouble Report #213) |
Field | Field Data |
---|---|
ID | 213 |
Category | mmtxT |
Synopsis | Null Pointer exception when Candidate.getMatchedLexicalElements() used |
Severity | serious |
Priority | medium |
Responsible | guy |
State | closed |
Class | sw-bug |
Arrival-Date | Wed Aug 24 13:42:00 EDT 2005 |
Closed-Date | Tue Jul 29 14:13:19 EDT 2008 |
Release | MMTx V2.4.B |
Environment | all |
Description | Line 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 | --- |
Notes | This 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 ]