This repository was archived by the owner on Sep 8, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
src/main/scala/scala/tools/partest Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1- sbt.version =0.13.15
1+ sbt.version =0.13.17
Original file line number Diff line number Diff line change @@ -41,7 +41,12 @@ object StreamCapture {
4141 def withExtraProperties [A ](extra : Map [String , String ])(action : => A ): A = {
4242 val saved = System .getProperties()
4343 val modified = new java.util.Properties ()
44- modified.putAll(saved)
44+ // on Java 9, we need to cast our way around this:
45+ // src/main/scala/scala/tools/partest/nest/StreamCapture.scala:44: ambiguous reference to overloaded definition,
46+ // both method putAll in class Properties of type (x$1: java.util.Map[_, _])Unit
47+ // and method putAll in class Hashtable of type (x$1: java.util.Map[_ <: Object, _ <: Object])Unit
48+ // match argument types (java.util.Properties)
49+ (modified : java.util.Hashtable [AnyRef , AnyRef ]).putAll(saved)
4550 extra.foreach { case (k, v) => modified.setProperty(k, v) }
4651 // Trying to avoid other threads seeing the new properties object prior to the new entries
4752 // https://github.com/scala/scala/pull/6391#issuecomment-371346171
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ package object partest {
9797 */
9898 def instantiate [A >: Null ](name : String ): A = (
9999 catching(classOf [ClassNotFoundException ], classOf [SecurityException ]) opt
100- (loader loadClass name).newInstance.asInstanceOf [A ] orNull
100+ (loader loadClass name).getConstructor(). newInstance() .asInstanceOf [A ] orNull
101101 )
102102 }
103103
You can’t perform that action at this time.
0 commit comments