Hello,
For some reason, the code below will make it to "case other" when the
map.get(key) returns None. In other words, "case None" will not match the
"None" returned by map.get(key).
I did not redefine "None" anywhere.
map.get(key) match {
case Some(ent) =>
ent.update()
case None =>
Log.error("None")
case other =>
Log.error("other: " + other)
}
The above code runs within an Actor (i.e.: multithreading) and it's quite
likely the thread that populates the map is not the one reading it later.
I'm only ever accessing the map from within this Actor, however.
I have ran the following code within "case other":
Log.error("classloaders: " +
other.getClass.getClassLoader.eq(None.getClass.getClassLoader)) // true
Log.error("class: " + (other.getClass() == None.getClass())) // true
Log.error("hash: " + (other.hashCode == None.hashCode())) // true
Log.error("system hash: " + (System.identityHashCode(other) ==
System.identityHashCode(None))) // false
Log.error("test 1: " + (None == other)) // false
Log.error("test 2: " + (None.eq(other))) // false
Log.error("test 3: " + (None.equals(other))) // false
The file path from which scala.None$ is loaded is the same for "other" and
"None".
I'm running out of ideas here, what can I do next to troubleshoot and find
the root cause ?
Regards,
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/groups/opt_out.