This repository was archived by the owner on Oct 29, 2025. It is now read-only.
Description This method may return null:
public Object [] send (String service , String path , String iface , String method , String signature , Object ... args ) {
try {
org .freedesktop .dbus .messages .Message message = new MethodCall (
service ,
path ,
iface ,
method , (byte ) 0 , signature , args );
if (log .isTraceEnabled ()) log .trace (String .valueOf (message ));
connection .sendMessage (message );
org .freedesktop .dbus .messages .Message response = ((MethodCall ) message ).getReply (2000L );
if (log .isTraceEnabled ()) log .trace (String .valueOf (response ));
Object [] parameters = null ;
if (response != null ) {
parameters = response .getParameters ();
log .debug (Arrays .deepToString (parameters ));
}
if (response instanceof org .freedesktop .dbus .errors .Error ) {
String error = response .getName ();
switch (error ) {
case "org.freedesktop.DBus.Error.NoReply" :
case "org.freedesktop.DBus.Error.UnknownMethod" :
case "org.freedesktop.dbus.exceptions.NotConnected" :
log .debug (error );
return null ;
default :
throw new DBusException (error );
}
}
return parameters ;
} catch (DBusException e ) {
log .error ("Unexpected D-Bus response:" , e );
}
return null ;
}
But responses are always assumed to be non-null, see e.g.:
@ Override
public boolean isOpen (String wallet ) {
Object [] response = send ("isOpen" , "s" , wallet );
return (boolean ) response [0 ];
}
Which causes downstream uncaught NPEs, as in cryptomator/cryptomator#1866
Reactions are currently unavailable
This method may return null:
kdewallet/src/main/java/org/freedesktop/dbus/handlers/MessageHandler.java
Lines 30 to 69 in 821e6ce
But responses are always assumed to be non-null, see e.g.:
kdewallet/src/main/java/org/purejava/KDEWallet.java
Lines 110 to 114 in 821e6ce
Which causes downstream uncaught NPEs, as in cryptomator/cryptomator#1866