Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential for uncaught null exception #3

Open
pjhenning opened this issue Mar 2, 2020 · 0 comments
Open

Potential for uncaught null exception #3

pjhenning opened this issue Mar 2, 2020 · 0 comments

Comments

@pjhenning
Copy link
Contributor

pjhenning commented Mar 2, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant