Scala - Problem using MapWrapper when upgrading from 2.7.7 to 2.8.1 -
i have piece of code inherited works under scala 2.7.7 (well, replacing import use jcl ). when try use 2.8.1 error:
error: not enough arguments constructor mapwrapper: (underlying: scala.collection.map[string,string])collection.javaconversions.mapwrapper[string,string]. unspecified value parameter underlying.
map.empty ++ new mapwrapper[string, string] {
^
i have google high , low, tried different things can't find how modify code work on scala 2.8.1
any pointers great.
thanks
import scala.collection.javaconversions.mapwrapper object errorobj{ def converttostringmap(javamap: hashtable[string, string]) = { map.empty ++ new mapwrapper[string, string] { def underlyinga = javamap } } }
mapwrapper
class in scala 2.8 (was trait abstract methods in 2.7). so, don’t need define abstract method underlying
anymore.
new mapwrapper[string, string](somemap)
Comments
Post a Comment