In AttributeExtractor methods getAttributesForCategory and getAttributesForCategory you pass the result of a HashMap.get directly into a unmodifiableList. This is dangerous because the get call has null in its valid range. You should decide how to handle invalid categories (I recommend a runtime exception) and adjust the logic so it's impossible to pass a null into unmodifiableList.
In
AttributeExtractor
methodsgetAttributesForCategory
andgetAttributesForCategory
you pass the result of aHashMap.get
directly into aunmodifiableList
. This is dangerous because theget
call hasnull
in its valid range. You should decide how to handle invalid categories (I recommend a runtime exception) and adjust the logic so it's impossible to pass a null intounmodifiableList
.