Skip to content

Conversation

@michaelknoch
Copy link
Collaborator

breaking change: Int does no longer conform to JavaParameterConvertible use JavaInt instead

public static var asJNIParameterString = "I"

public func toJavaParameter() -> JavaParameter {
return JavaParameter(int: JavaInt(self))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can now just read int: self

public static func fromStaticField(_ fieldID: JavaFieldID, of javaClass: JavaClass) throws -> JavaInt {
let result = try jni.GetStaticIntField(of: javaClass, id: fieldID)
return Int(result)
return JavaInt(result)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these can be directly returned now return try jni.GetStaticIntField(of: javaClass, id: fieldID)

@ephemer ephemer merged commit a2b9c15 into devel Aug 16, 2018
@ephemer ephemer deleted the javaint branch August 16, 2018 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants