bug
bug copied to clipboard
scala.collection.mutable.SynchronisedXXX classes deprecated, implicits missing for Java equivalents
From a conversation on scala-user:
[Alan Burlison] One other surprise that I came across that's only hinted at in the 2.11 release notes is the deprecation of the SynchronizedXXX collection traits, such as SynchronizedMap. In that particular case the deprecation warning points you at java.util.concurrent.ConcurrentHashMap. ... there only seems to be implicit conversions for the Java ConcurrentMap and not the other suggested replacements for the deprecated SynchronizedXXX traits, is that an oversight or have I missed something?
[Adriaan Moors] We should add the ones that are suggested but missing. Could you file a bug and assign to Rex?
I believe the list of the Java classes that are missing Scala implicits is:
Deprecated Scala class -> Recommended Java replacement SynchronizedBuffer -> ConcurrentLinkedQueue SynchronizedPriorityQueue -> ConcurrentSkipListSet SynchronizedQueue -> ConcurrentLinkedQueue SynchronizedSet -> ConcurrentHashMap SynchronizedStack -> LinkedBlockingDequeue
Imported From: https://issues.scala-lang.org/browse/SI-8536?orig=1 Reporter: Alan Burlison (alanbur) Affected Versions: 2.11.0
@adriaanm said: Even though we can't add new implicits in 2.11.x, maybe we should still fix the documentation not to refer to missing conversions -- if that's indeed the case?
@Ichoran said: @adriaanm The documentation doesn't say there are conversions. It just says you should use the Java classes. The optimistic may hope that these have conversions, but they're not promised. Shall I add to the docs a statement that you have to use these the Java way?
@adriaanm said: Yes, let's make the docs more explicit
might still interest @scala/collections crew?