Skip to content

Commit c9b8b55

Browse files
committed
ClosureRunnable moved to java_swift package
1 parent 0851e2d commit c9b8b55

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

Sources/java_lang.swift

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,13 @@ extension JavaObject {
2626
} catch let notFound as ClassNotFoundException {
2727
notFound.printStackTrace();
2828
} catch {
29-
JNI.report("Uncaught exception casting")
29+
JNI.report("validDownCast: Uncaught exception \(error)")
3030
}
3131
return false;
3232
}
3333

3434
}
3535

36-
public class ClosureRunnable: RunnableBase {
37-
38-
var closure: () -> ()
39-
40-
public init( _ closure: @escaping () -> () ) {
41-
self.closure = closure
42-
super.init()
43-
}
44-
45-
public required init(javaObject: jobject!) {
46-
fatalError("init(javaObject:) has not been implemented")
47-
}
48-
49-
public override func run() {
50-
closure()
51-
closure = { return }
52-
JNI.envCache[JNI.threadKey] = nil
53-
}
54-
55-
}
56-
5736
extension Thread {
5837

5938
public convenience init( _ closure: @escaping () -> () ) {

0 commit comments

Comments
 (0)