File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import Foundation
6
6
import java_swift
7
7
import CJavaVM
8
8
9
- public typealias JavaEncodableClosure = ( Encodable ) throws -> jobject
9
+ public typealias JavaEncodableClosure = ( Any ) throws -> jobject
10
10
public typealias JavaDecodableClosure = ( jobject ) throws -> Decodable
11
11
12
12
public struct JavaCoderConfig {
Original file line number Diff line number Diff line change @@ -522,7 +522,7 @@ extension JavaEncoder {
522
522
let anyCodableValue = value as! AnyCodable
523
523
if let javaClassname = JavaCoderConfig . codableClassNames [ anyCodableValue. typeName] {
524
524
let encodableClosure = JavaCoderConfig . encodableClosures [ anyCodableValue. typeName] !
525
- let javaObject = try encodableClosure ( anyCodableValue. value as! Encodable )
525
+ let javaObject = try encodableClosure ( anyCodableValue. value)
526
526
storage = JNIStorageObject ( type: . object( className: javaClassname) , javaObject: javaObject)
527
527
}
528
528
else {
You can’t perform that action at this time.
0 commit comments