diff options
author | Matthew Johnson <mjj29@hecate.trinhall.cam.ac.uk> | 2006-11-17 14:55:48 +0000 |
---|---|---|
committer | Matthew Johnson <mjj29@hecate.trinhall.cam.ac.uk> | 2006-11-17 14:55:48 +0000 |
commit | 581d165fde458f2d4c322b4bc11ffd601b78efd2 (patch) | |
tree | 56ac1d2726e22dad1dfc345b6e30774331fcd899 | |
parent | e8ecff7d84410d759b0f4d6f61cf9336b63fc20c (diff) |
change to DBus.Error.NoReply
-rw-r--r-- | changelog | 1 | ||||
-rw-r--r-- | org/freedesktop/dbus/DBusAsyncReply.java | 2 | ||||
-rw-r--r-- | org/freedesktop/dbus/NoReply.java | 24 | ||||
-rw-r--r-- | org/freedesktop/dbus/RemoteInvocationHandler.java | 3 |
4 files changed, 5 insertions, 25 deletions
@@ -1,6 +1,7 @@ Version 1.12: * fix internal-cross-test bugs and increase error verbosity + * add org.freedesktop.DBus.Error.NoReply, change to that from my own Version 1.11: diff --git a/org/freedesktop/dbus/DBusAsyncReply.java b/org/freedesktop/dbus/DBusAsyncReply.java index 0787a30..44dcede 100644 --- a/org/freedesktop/dbus/DBusAsyncReply.java +++ b/org/freedesktop/dbus/DBusAsyncReply.java @@ -15,6 +15,8 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; +import org.freedesktop.DBus.Error.NoReply; + /** * A handle to an asynchronous method call. */ diff --git a/org/freedesktop/dbus/NoReply.java b/org/freedesktop/dbus/NoReply.java deleted file mode 100644 index 44910a2..0000000 --- a/org/freedesktop/dbus/NoReply.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - D-Bus Java Bindings - Copyright (c) 2005-2006 Matthew Johnson - - This program is free software; you can redistribute it and/or modify it - under the terms of either the GNU General Public License Version 2 or the - Academic Free Licence Version 2.1. - - Full licence texts are included in the COPYING file with this program. -*/ -package org.freedesktop.dbus; - -/** - * Thrown by a DBusAsyncReply if no reply has been received - * and you are trying to recover the reply. - */ -@SuppressWarnings("serial") -public class NoReply extends DBusExecutionException -{ - public NoReply(String message) - { - super (message); - } -} diff --git a/org/freedesktop/dbus/RemoteInvocationHandler.java b/org/freedesktop/dbus/RemoteInvocationHandler.java index c462421..18595b1 100644 --- a/org/freedesktop/dbus/RemoteInvocationHandler.java +++ b/org/freedesktop/dbus/RemoteInvocationHandler.java @@ -20,6 +20,7 @@ import java.lang.reflect.Proxy; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.util.List; + import org.freedesktop.DBus; class RemoteInvocationHandler implements InvocationHandler @@ -98,7 +99,7 @@ class RemoteInvocationHandler implements InvocationHandler if (m.isAnnotationPresent(DBus.Method.NoReply.class)) return null; DBusMessage reply = call.getReply(); - if (null == reply) throw new NoReply("No reply within specified time"); + if (null == reply) throw new DBus.Error.NoReply("No reply within specified time"); if (reply instanceof DBusErrorMessage) ((DBusErrorMessage) reply).throwException(); |