Share

OpenNLP

Tracker: Bugs

5 use of null object in BuildContextGenerator - ID: 2882228
Last Update: Tracker Item Submitted ( nobody )

The Java compiler warns of a null object in
opennlp.tools.parser.treeinsert.BuildContextGenerator.java and the compiler
is correct.
Without understanding too well what is done, the following line does not
make too much sense

Parse p_1 = null;
[...]
if (p_2 != null) {
punct_2s = p_1.getPreviousPunctuationSet();
}

I guess it should be either (which does not make too much
sense either, since p_2) is never set.
if (p_2 != null) {
punct_2s = p_2.getPreviousPunctuationSet();
}

Or (which would mean 2 defects in the same area)
if (p2 != null) {
punct_2s = p2.getPreviousPunctuationSet();
}

But clearly something is wrong...


Nobody/Anonymous ( nobody ) - 2009-10-20 09:15

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.