diff options
Diffstat (limited to 'test')
-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))) |