summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authormihaylov <mihaylov@epfl.ch>2007-07-20 13:14:03 +0000
committermihaylov <mihaylov@epfl.ch>2007-07-20 13:14:03 +0000
commitc633afd891acc57662d5da29425cf7a93f8d6ea7 (patch)
treeda7baf72722c03d8426dfd6479da62ec5a7ad980 /test/files
parent0f1add0d0b95fd6807b4de8a6df642b66512a295 (diff)
downloadscala-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
Diffstat (limited to 'test/files')
-rw-r--r--test/files/jvm5/annotations.check13
-rw-r--r--test/files/jvm5/annotations.scala6
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)))