dmeoli/WS4J

Potential for uncaught null exception

pjhenning opened this issue · 0 comments

Hello, it is possible to construct a Concept value, via the first constructor, which gives an object with no value for the pos field:

public Concept(String synsetID) {
this.synsetID = synsetID;
}
but code elsewhere that operates on Concept objects will assume that the pos field has been populated:
if (concept1.getPOS().equals(POS.NOUN)) maxDepth = 20;
which can result in a runtime exception.