diff options
author | mihaylov <mihaylov@epfl.ch> | 2007-07-20 13:14:03 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2007-07-20 13:14:03 +0000 |
commit | c633afd891acc57662d5da29425cf7a93f8d6ea7 (patch) | |
tree | da7baf72722c03d8426dfd6479da62ec5a7ad980 | |
parent | 0f1add0d0b95fd6807b4de8a6df642b66512a295 (diff) | |
download | scala-c633afd891acc57662d5da29425cf7a93f8d6ea7.tar.gz scala-c633afd891acc57662d5da29425cf7a93f8d6ea7.tar.bz2 scala-c633afd891acc57662d5da29425cf7a93f8d6ea7.zip |
Explicitly import java.lang.Integer in test/fil...
Explicitly import java.lang.Integer in test/files/jvm5/annotations.scala
-rw-r--r-- | test/files/jvm5/annotations.check | 13 | ||||
-rw-r--r-- | test/files/jvm5/annotations.scala | 6 |
2 files changed, 3 insertions, 16 deletions
diff --git a/test/files/jvm5/annotations.check b/test/files/jvm5/annotations.check index 03c57ee59b..f01f31d1d9 100644 --- a/test/files/jvm5/annotations.check +++ b/test/files/jvm5/annotations.check @@ -1,16 +1,3 @@ -annotations.scala:133: warning: type Integer in object Predef is deprecated - private var count: Integer = 0 - ^ -annotations.scala:138: warning: type Integer in object Predef is deprecated - getClass().getMethod("setCount", Array[java.lang.Class](classOf[Integer])) - ^ -annotations.scala:140: warning: type Integer in object Predef is deprecated - def get = getter.invoke(this, Array()).asInstanceOf[Integer].intValue - ^ -annotations.scala:141: warning: type Integer in object Predef is deprecated - def set(n: Int) = setter.invoke(this, Array(new Integer(n))) - ^ -four warnings found class java.rmi.RemoteException class java.io.IOException @java.lang.Deprecated() diff --git a/test/files/jvm5/annotations.scala b/test/files/jvm5/annotations.scala index 4a516a16c4..107bebbee7 100644 --- a/test/files/jvm5/annotations.scala +++ b/test/files/jvm5/annotations.scala @@ -125,8 +125,8 @@ object Test4 { object Test5 { import scala.reflect.BeanProperty -// no need to import java.lang.Integer, Predef.Integer is simply an alias for it -// classOf[Integer] now properly resolves to classOf[java.lang.Integer] + import java.lang.Integer + class Count { // we use "Integer" instead of "Int" because of Java reflection @BeanProperty @@ -135,7 +135,7 @@ object Test5 { private val getter = getClass().getMethod("getCount", Array[java.lang.Class]()) private val setter = - getClass().getMethod("setCount", Array[java.lang.Class](classOf[Integer])) + getClass().getMethod("setCount", Array(classOf[Integer])) def get = getter.invoke(this, Array()).asInstanceOf[Integer].intValue def set(n: Int) = setter.invoke(this, Array(new Integer(n))) |