This repository was archived by the owner on Sep 8, 2022. It is now read-only.
File tree 3 files changed +8
-3
lines changed
src/main/scala/scala/tools/partest
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 {
41
41
def withExtraProperties [A ](extra : Map [String , String ])(action : => A ): A = {
42
42
val saved = System .getProperties()
43
43
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)
45
50
extra.foreach { case (k, v) => modified.setProperty(k, v) }
46
51
// Trying to avoid other threads seeing the new properties object prior to the new entries
47
52
// 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 {
97
97
*/
98
98
def instantiate [A >: Null ](name : String ): A = (
99
99
catching(classOf [ClassNotFoundException ], classOf [SecurityException ]) opt
100
- (loader loadClass name).newInstance.asInstanceOf [A ] orNull
100
+ (loader loadClass name).getConstructor(). newInstance() .asInstanceOf [A ] orNull
101
101
)
102
102
}
103
103
You can’t perform that action at this time.
0 commit comments