summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Johnson <mjj29@hecate.trinhall.cam.ac.uk>2006-12-22 15:30:32 +0000
committerMatthew Johnson <mjj29@hecate.trinhall.cam.ac.uk>2006-12-22 15:30:32 +0000
commitc3dde281ce9651ac70267b17f1ad10e2b1e46981 (patch)
treee76aaec8581cdfa26eadb79c3664b0a90a294d4f
parent1f5ce0023421fa6988879ee598bf58300193c838 (diff)
more updates
-rw-r--r--Makefile4
-rw-r--r--org/freedesktop/dbus/DBusMap.java7
-rw-r--r--org/freedesktop/dbus/Message.java2
-rw-r--r--org/freedesktop/dbus/exceptions/MessageProtocolVersionException.java1
-rw-r--r--org/freedesktop/dbus/exceptions/MessageTypeException.java1
5 files changed, 12 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4e01a29..e464cc7 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,6 @@ MAKE?=make
# Program parameters
CPFLAG?=-classpath
JCFLAGS?=-Xlint:all -O -g:none
-JCFLAGS+=-cp classes:$(CLASSPATH):$(JAVAUNIXJARDIR)/unix.jar
JFLAGS+=-Djava.library.path=$(JAVAUNIXLIBDIR)
# Source/Class locations
@@ -39,6 +38,7 @@ MANPREFIX?=$(PREFIX)/share/man/man1
JAVAUNIXLIBDIR?=/usr/lib/jni
# Installation directory of the java-unix jars
JAVAUNIXJARDIR?=/usr/share/java
+DEBUG=enable
# Version numbering
VERSION = 1.13
@@ -65,7 +65,7 @@ viewerclasses: .viewerclasses
touch .viewerclasses
.classes: $(SRCDIR)/*.java $(SRCDIR)/dbus/*.java $(SRCDIR)/dbus/exceptions/*.java $(SRCDIR)/dbus/types/*.java $(SRCDIR)/dbus/bin/*.java
mkdir -p classes
- $(JAVAC) -d classes $(JCFLAGS) $^
+ $(JAVAC) -d classes -cp classes:${JAVAUNIXJARDIR}/unix.jar:${JAVAUNIXJARDIR}/debug-$(DEBUG).jar:${JAVAUNIXJARDIR}/hexdump.jar:$(CLASSPATH) $(JCFLAGS) $^
touch .classes
libdbus-java-$(VERSION).jar: .classes
diff --git a/org/freedesktop/dbus/DBusMap.java b/org/freedesktop/dbus/DBusMap.java
index d5e44f8..21aaa3e 100644
--- a/org/freedesktop/dbus/DBusMap.java
+++ b/org/freedesktop/dbus/DBusMap.java
@@ -38,10 +38,12 @@ class DBusMap<K, V> implements Map<K, V>
if (!(o instanceof DBusMap.Entry)) return false;
return this.entry == ((Entry) o).entry;
}
+ @SuppressWarnings("unchecked")
public K getKey()
{
return (K) entries[entry][0];
}
+ @SuppressWarnings("unchecked")
public V getValue()
{
return (V) entries[entry][1];
@@ -85,6 +87,7 @@ class DBusMap<K, V> implements Map<K, V>
s.add(new Entry(i));
return s;
}
+ @SuppressWarnings("unchecked")
public V get(Object key)
{
for (int i = 0; i < entries.length; i++)
@@ -96,6 +99,7 @@ class DBusMap<K, V> implements Map<K, V>
{
return entries.length == 0;
}
+ @SuppressWarnings("unchecked")
public Set<K> keySet()
{
Set<K> s = new TreeSet<K>();
@@ -119,11 +123,12 @@ class DBusMap<K, V> implements Map<K, V>
{
return entries.length;
}
+ @SuppressWarnings("unchecked")
public Collection<V> values()
{
List<V> l = new Vector<V>();
for (Object[] entry: entries)
- l.add((V) entry[0]);
+ l.add((V) entry[1]);
return l;
}
public int hashCode()
diff --git a/org/freedesktop/dbus/Message.java b/org/freedesktop/dbus/Message.java
index 2aaa69c..2e0d29b 100644
--- a/org/freedesktop/dbus/Message.java
+++ b/org/freedesktop/dbus/Message.java
@@ -11,6 +11,7 @@
package org.freedesktop.dbus;
import java.lang.reflect.Array;
+import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
@@ -368,6 +369,7 @@ public class Message
* @param data The value to marshall.
* @return The offset into the signature of the end of this value's type.
*/
+ @SuppressWarnings("unchecked")
private int appendone(byte[] sigb, int sigofs, Object data) throws DBusException
{
try {
diff --git a/org/freedesktop/dbus/exceptions/MessageProtocolVersionException.java b/org/freedesktop/dbus/exceptions/MessageProtocolVersionException.java
index e58ed7b..837b68b 100644
--- a/org/freedesktop/dbus/exceptions/MessageProtocolVersionException.java
+++ b/org/freedesktop/dbus/exceptions/MessageProtocolVersionException.java
@@ -12,6 +12,7 @@ package org.freedesktop.dbus.exceptions;
import java.io.IOException;
+@SuppressWarnings("serial")
public class MessageProtocolVersionException extends IOException implements FatalException
{
public MessageProtocolVersionException(String message)
diff --git a/org/freedesktop/dbus/exceptions/MessageTypeException.java b/org/freedesktop/dbus/exceptions/MessageTypeException.java
index 3ec546c..800063c 100644
--- a/org/freedesktop/dbus/exceptions/MessageTypeException.java
+++ b/org/freedesktop/dbus/exceptions/MessageTypeException.java
@@ -12,6 +12,7 @@ package org.freedesktop.dbus.exceptions;
import java.io.IOException;
+@SuppressWarnings("serial")
public class MessageTypeException extends IOException implements NonFatalException
{
public MessageTypeException(String message)