Just a few minor issues with dbus-java that I've noticed and fixed on my end, figured this should be fixed in the main trunk:<br><br>1. In line 469/470 of AbstractConnection.java(queueOutgoing), the 'if(null == outgoing)' should be outside of the synchronized block; otherwise if you have disconnected from the bus a NullPointerException will be thrown. (I only noticed this when I apparently sent an invalid string over the bus and tried to send a new message; It seems as though sending a string that's not properly formatted in UTF-8 will kick you off?)<br>
2. When using callMethodAsync, if you are calling a method which takes in an array(i.e. java.util.List), the method call will fail because the library will not properly see that whatever you're passing in is of type List, it will only see the implementation type(i.e. ArrayList). To fix this, I've changed the loop in callMethodAsync in AbstractConnection.java to look like this:<br>
<br> for (int i = 0; i < parameters.length; i++){<br> types[i] = parameters[i].getClass();<br> if( parameters[i] instanceof java.util.List<?> ){<br> try{<br> types[i] = Class.forName("java.util.List");<br>
}catch(ClassNotFoundException e){}<br> }<br> }<br><br>I haven't tried this with structs(as for what I'm doing they're not needed), but I suspect that the same issue would occur.<br><div>This fix would also have to be applied to callWithCallback.<br>
</div><div><br></div><div>-Robert Middleton</div>