Hi
I think I found a small bug in DeviceDescriptor: its getProperties() method specifies it returns "a String
array (a defensive copy) of the device properties or an empty String
array if none are defined."
However, when I run the IMlet below, it returns null instead of an empty array & prints "true".
My environment: Raspberry Pi (model B rev 2) with Oracle Java ME Embedded 8.1
Kind regards
Anthony
import java.io.IOException;
import javax.microedition.midlet.MIDlet;
import jdk.dio.DeviceManager;
public class TestGpio extends MIDlet {
@Override
public void startApp() {
try {
String[] properties = DeviceManager.open(24).getDescriptor().getProperties();
System.out.println(properties == null);
} catch (IOException e) {
} finally {
notifyDestroyed();
}
}
@Override
public void destroyApp(boolean unconditional) {
}
}