WS4J icon indicating copy to clipboard operation
WS4J copied to clipboard

Potential for uncaught null exception

Open pjhenning opened this issue 4 years ago • 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: https://github.com/dmeoli/WS4J/blob/44589e724e1bd4a2701dcaf1d5803eea00b2c610/src/main/java/edu/uniba/di/lacam/kdde/lexical_db/data/Concept.java#L12-L14 but code elsewhere that operates on Concept objects will assume that the pos field has been populated: https://github.com/dmeoli/WS4J/blob/44589e724e1bd4a2701dcaf1d5803eea00b2c610/src/main/java/edu/uniba/di/lacam/kdde/ws4j/similarity/LeacockChodorow.java#L60 which can result in a runtime exception.

pjhenning avatar Mar 02 '20 23:03 pjhenning