I've an unexpected trouble calling put on an old-school hashtable. What's going on here?
Welcome to Scala version 2.8.0.final (Java HotSpot(TM) Client VM, Java 1.6.0_21).
Type in expressions to have them evaluated.
Type :help for more information.
scala> import com.ibm.mq._
import com.ibm.mq._
scala> MQEnvironment.properties
res1: java.util.Hashtable[_, _] = {}
scala> res1.put("transport", "MQSeries")
<console>:10: error: type mismatch;
found : java.lang.String("transport")
required: ?0 where type ?0
res1.put("transport", "MQSeries")
^
PS, the question still stands as is, but I have a nasty workaround:
scala> new java.util.Hashtable[String, String]
res10: java.util.Hashtable[String,String] = {}
scala> res10.put("transport", "MQSeries")
res11: String = null
scala> MQEnvironment.properties = res10
scala> MQEnvironment.properties
res13: java.util.Hashtable[_, _] = {transport=MQSeries}