Hierarchical Temporal Memory implementation in Java - an official Community-Driven Java port of the Numenta Platform for Intelligent Computing (NuPIC).
GNU Affero General Public License v3.0
308
stars
160
forks
source link
Use Robust Approach For Comparing Class Tokens #513
Right now, the Classifier type Class tokens in Layer.java are compared using the == operator. This is unlikely to be e problem since the comparison is being done on a Class object, and there is usually only one loaded in the classloader. But, in the event that multiple classloaders are used, it could fail to properly match the Class tokens. A better approach would be to use the Class.isAssignableFrom method.
Cool. I see you decided to go through with it... Ok. 👍 I'm extended my deadline to announce the new release to end of day tomorrow because I've been busy dealing with some personal family drama.
Right now, the
Classifier
typeClass
tokens inLayer.java
are compared using the==
operator. This is unlikely to be e problem since the comparison is being done on aClass
object, and there is usually only one loaded in the classloader. But, in the event that multiple classloaders are used, it could fail to properly match theClass
tokens. A better approach would be to use theClass.isAssignableFrom
method.