dbus-java icon indicating copy to clipboard operation
dbus-java copied to clipboard

Kotlin Interface does not work

Open Doomsdayrs opened this issue 10 months ago • 3 comments

I have the following class produced by the auto generator, then converted to Kotlin

package org.freedesktop.portal

@Suppress("FunctionName")
@DBusProperty(
	name = "version",
	type = UInt32::class,
	access = DBusProperty.Access.READ
)
actual interface Account : DBusInterface {

	actual fun GetUserInformation(
		window: String,
		options: Map<String, Variant<*>>,
	): DBusPath
}

Then I have the same class, but in original java.

package org.freedesktop.portal;

/**
 * Auto-generated class.
 */
//@Suppress("FunctionName")
@DBusProperty(
	name = "version",
	type = UInt32.class,
	access = DBusProperty.Access.READ
)
public interface Account extends DBusInterface {

	DBusPath GetUserInformation(
		String window,
		Map<String, Variant<?>> options
	);
}

Utilizing the classes, we get the following results

Language Result
Kotlin org.freedesktop.dbus.exceptions.FatalDBusException: java.io.EOFException: (1) Underlying transport returned -1
Java No error

What is going on here?

Doomsdayrs avatar Sep 06 '23 12:09 Doomsdayrs