Fixed KT-5223 Converter from Java should convert "throws" in method declaration
#KT-5223 Fixed
This commit is contained in:
@@ -9,6 +9,7 @@ class Test() : Base() {
|
||||
return super.equals(o)
|
||||
}
|
||||
|
||||
throws(javaClass<CloneNotSupportedException>())
|
||||
override fun clone(): Any {
|
||||
return super.clone()
|
||||
}
|
||||
@@ -17,6 +18,7 @@ class Test() : Base() {
|
||||
return super.toString()
|
||||
}
|
||||
|
||||
throws(javaClass<Throwable>())
|
||||
override fun finalize() {
|
||||
super.finalize()
|
||||
}
|
||||
@@ -31,6 +33,7 @@ class Base() {
|
||||
return super.equals(o)
|
||||
}
|
||||
|
||||
throws(javaClass<CloneNotSupportedException>())
|
||||
protected fun clone(): Any {
|
||||
return super.clone()
|
||||
}
|
||||
@@ -39,6 +42,7 @@ class Base() {
|
||||
return super.toString()
|
||||
}
|
||||
|
||||
throws(javaClass<Throwable>())
|
||||
protected fun finalize() {
|
||||
super.finalize()
|
||||
}
|
||||
|
||||
@@ -11,12 +11,14 @@ class X() {
|
||||
return super.toString()
|
||||
}
|
||||
|
||||
throws(javaClass<CloneNotSupportedException>())
|
||||
protected fun clone(): Any {
|
||||
return super.clone()
|
||||
}
|
||||
}
|
||||
|
||||
class Y() : Thread() {
|
||||
throws(javaClass<CloneNotSupportedException>())
|
||||
override fun clone(): Any {
|
||||
return super.clone()
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ class X() : Base() {
|
||||
return super.toString()
|
||||
}
|
||||
|
||||
throws(javaClass<CloneNotSupportedException>())
|
||||
protected fun clone(): Any {
|
||||
return super.clone()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
//method
|
||||
void foo() throws IOException, SerializationException;
|
||||
@@ -0,0 +1,2 @@
|
||||
throws(javaClass<IOException>(), javaClass<SerializationException>())
|
||||
fun foo()
|
||||
Reference in New Issue
Block a user