Skip to content

Commit

Permalink
Added some more trace logging; Replaced deprecated method usage; Remo…
Browse files Browse the repository at this point in the history
…ved debug setting in unit test
  • Loading branch information
hypfvieh committed Sep 16, 2024
1 parent 63acbf2 commit 4dabe83
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ private synchronized void checkReply() {

rval = (T) obj;
} catch (DBusExecutionException _ex) {
logger.trace("DBusExecutionException while creating message from MethodReturn", _ex);
error = _ex;
} catch (DBusException _ex) {
logger.debug("RemoteInvocationHandler failed", _ex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ static Object deSerializeParameter(Object _parameter, Type _type, AbstractConnec
} else {
type2 = null;
}
LOGGER.trace("Type is: {}", type2);
if (null != type2) {
parameter = deSerializeParameters((List<Object>) parameter, type2, _conn);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.freedesktop.dbus.annotations.Position;
import org.freedesktop.dbus.types.DBusStructType;
import org.freedesktop.dbus.types.Variant;
import org.freedesktop.dbus.utils.PrimitiveUtils;

import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
Expand Down Expand Up @@ -180,8 +181,8 @@ public static <T extends Struct> T createStruct(Class<?>[] _constructorArgs, Obj
} catch (NoSuchMethodException | SecurityException _ex) {
for (int i = 0; i < _constructorArgs.length; i++) {
Class<?> class1 = _constructorArgs[i];
if (ArrayFrob.getWrapperToPrimitiveTypes().containsKey(class1)) {
_constructorArgs[i] = ArrayFrob.getWrapperToPrimitiveTypes().get(class1);
if (PrimitiveUtils.getWrapperToPrimitiveTypes().containsKey(class1)) {
_constructorArgs[i] = PrimitiveUtils.getWrapperToPrimitiveTypes().get(class1);
return createStruct(_constructorArgs, _values, _classToConstruct);
}
}
Expand Down
2 changes: 0 additions & 2 deletions dbus-java-tests/src/test/java/sample/issue/Issue268Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.freedesktop.dbus.interfaces.DBusInterface;
import org.freedesktop.dbus.interfaces.DBusSigHandler;
import org.freedesktop.dbus.messages.DBusSignal;
import org.freedesktop.dbus.messages.MethodCall;
import org.freedesktop.dbus.test.AbstractDBusDaemonBaseTest;
import org.freedesktop.dbus.types.Variant;
import org.junit.jupiter.api.Test;
Expand All @@ -26,7 +25,6 @@ public class Issue268Test extends AbstractDBusDaemonBaseTest {

@Test
void testSignal() throws Exception {
MethodCall.setDefaultTimeout(1000000);
List<DBusSignal> failed = new ArrayList<>();
try (DBusConnection exportDBusConn = export(failed);
DBusConnection receiveDBusConn = receive()) {
Expand Down

0 comments on commit 4dabe83

Please sign in to comment.