bug icon indicating copy to clipboard operation
bug copied to clipboard

scala.collection.mutable.SynchronisedXXX classes deprecated, implicits missing for Java equivalents

Open scabug opened this issue 11 years ago • 5 comments

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

scabug avatar Apr 25 '14 10:04 scabug

Imported From: https://issues.scala-lang.org/browse/SI-8536?orig=1 Reporter: Alan Burlison (alanbur) Affected Versions: 2.11.0

scabug avatar Apr 25 '14 10:04 scabug

@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?

scabug avatar Apr 25 '14 16:04 scabug

@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?

scabug avatar Nov 26 '14 00:11 scabug

@adriaanm said: Yes, let's make the docs more explicit

scabug avatar Jan 19 '16 23:01 scabug

might still interest @scala/collections crew?

SethTisue avatar Mar 03 '25 20:03 SethTisue