summaryrefslogtreecommitdiff
path: root/gnu/classpath/jdwp/processor
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/classpath/jdwp/processor')
-rw-r--r--gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java6
-rw-r--r--gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java6
-rw-r--r--gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java10
-rw-r--r--gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java4
-rw-r--r--gnu/classpath/jdwp/processor/ClassTypeCommandSet.java13
-rw-r--r--gnu/classpath/jdwp/processor/MethodCommandSet.java8
-rw-r--r--gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java6
-rw-r--r--gnu/classpath/jdwp/processor/PacketProcessor.java6
-rw-r--r--gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java32
-rw-r--r--gnu/classpath/jdwp/processor/StackFrameCommandSet.java3
-rw-r--r--gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java9
-rw-r--r--gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java24
12 files changed, 66 insertions, 61 deletions
diff --git a/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java
index 93c9d73e3..be606ad3c 100644
--- a/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java
+++ b/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java
@@ -1,6 +1,6 @@
/* ArrayReferenceCommandSet.java -- class to implement the Array
Reference Command Set
- Copyright (C) 2005 Free Software Foundation
+ Copyright (C) 2005, 2013 Free Software Foundation
This file is part of GNU Classpath.
@@ -110,7 +110,7 @@ public class ArrayReferenceCommandSet
int length = bb.getInt();
// We need to write out the byte signifying the type of array first
- Class clazz = array.getClass().getComponentType();
+ Class<?> clazz = array.getClass().getComponentType();
// Uugh, this is a little ugly but it's the only time we deal with
// arrayregions
@@ -166,7 +166,7 @@ public class ArrayReferenceCommandSet
Object array = oid.getObject();
int first = bb.getInt();
int length = bb.getInt();
- Class type = array.getClass().getComponentType();
+ Class<?> type = array.getClass().getComponentType();
for (int i = first; i < first + length; i++)
{
Object value = Value.getUntaggedObject(bb, type);
diff --git a/gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java b/gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java
index 899bf2997..3aa4088f8 100644
--- a/gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java
+++ b/gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java
@@ -1,5 +1,5 @@
/* ArrayTypeCommandSet.java -- class to implement the ArrayType Command Set
- Copyright (C) 2005 Free Software Foundation
+ Copyright (C) 2005, 2013 Free Software Foundation
This file is part of GNU Classpath.
@@ -90,8 +90,8 @@ public class ArrayTypeCommandSet
throws JdwpException, IOException
{
ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
- Class arrayType = refId.getType();
- Class componentType = arrayType.getComponentType();
+ Class<?> arrayType = refId.getType();
+ Class<?> componentType = arrayType.getComponentType();
int length = bb.getInt();
Object newArray = Array.newInstance(componentType, length);
diff --git a/gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java
index 295410f6c..48e05a4a4 100644
--- a/gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java
+++ b/gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java
@@ -1,6 +1,6 @@
/* ClassLoaderReferenceCommandSet.java -- class to implement the
ClassLoaderReference Command Set
- Copyright (C) 2005 Free Software Foundation
+ Copyright (C) 2005, 2013 Free Software Foundation
This file is part of GNU Classpath.
@@ -95,11 +95,13 @@ public class ClassLoaderReferenceCommandSet
{
ObjectId oId = idMan.readObjectId(bb);
ClassLoader cl = (ClassLoader) oId.getObject();
- ArrayList loadRequests = VMVirtualMachine.getLoadRequests(cl);
+ // VMWARN: Suppress warning until VM layer is upgraded to generics
+ @SuppressWarnings("unchecked")
+ ArrayList<Class<?>> loadRequests = VMVirtualMachine.getLoadRequests(cl);
os.writeInt(loadRequests.size());
- for (Iterator iter = loadRequests.iterator(); iter.hasNext();)
+ for (Iterator<Class<?>> iter = loadRequests.iterator(); iter.hasNext();)
{
- Class clazz = (Class)iter.next();
+ Class<?> clazz = iter.next();
ReferenceTypeId refId = idMan.getReferenceTypeId(clazz);
refId.writeTagged(os);
}
diff --git a/gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java
index b32dbc2e5..6006d72fa 100644
--- a/gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java
+++ b/gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java
@@ -1,6 +1,6 @@
/* ClassObjectReferenceCommandSet.java -- class to implement the
ClassObjectReference Command Set
- Copyright (C) 2005 Free Software Foundation
+ Copyright (C) 2005, 2013 Free Software Foundation
This file is part of GNU Classpath.
@@ -87,7 +87,7 @@ public class ClassObjectReferenceCommandSet
throws JdwpException, IOException
{
ObjectId oid = idMan.readObjectId(bb);
- Class clazz = (Class) oid.getObject();
+ Class<?> clazz = (Class<?>) oid.getObject();
// The difference between a ClassObjectId and a ReferenceTypeId is one is
// stored as an ObjectId and the other as a ReferenceTypeId.
diff --git a/gnu/classpath/jdwp/processor/ClassTypeCommandSet.java b/gnu/classpath/jdwp/processor/ClassTypeCommandSet.java
index ec496bfe9..46f128ec7 100644
--- a/gnu/classpath/jdwp/processor/ClassTypeCommandSet.java
+++ b/gnu/classpath/jdwp/processor/ClassTypeCommandSet.java
@@ -1,6 +1,6 @@
/* ClassTypeCommandSet.java -- class to implement the ClassType
Command Set
- Copyright (C) 2005, 2007 Free Software Foundation
+ Copyright (C) 2005, 2007, 2013 Free Software Foundation
This file is part of GNU Classpath.
@@ -105,8 +105,8 @@ public class ClassTypeCommandSet
throws JdwpException, IOException
{
ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
- Class clazz = refId.getType();
- Class superClazz = clazz.getSuperclass();
+ Class<?> clazz = refId.getType();
+ Class<?> superClazz = clazz.getSuperclass();
if (superClazz == null) {
os.writeLong(0L);
@@ -119,10 +119,7 @@ public class ClassTypeCommandSet
private void executeSetValues(ByteBuffer bb, DataOutputStream os)
throws JdwpException, IOException
{
- ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
-
- // We don't actually seem to need this...
- Class clazz = refId.getType();
+ idMan.readReferenceTypeId(bb);
int numValues = bb.getInt();
@@ -183,7 +180,7 @@ public class ClassTypeCommandSet
throws JdwpException, IOException
{
ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
- Class clazz = refId.getType();
+ Class<?> clazz = refId.getType();
ObjectId tId = idMan.readObjectId(bb);
Thread thread = (Thread) tId.getObject();
diff --git a/gnu/classpath/jdwp/processor/MethodCommandSet.java b/gnu/classpath/jdwp/processor/MethodCommandSet.java
index 043be7cf0..a48663f8e 100644
--- a/gnu/classpath/jdwp/processor/MethodCommandSet.java
+++ b/gnu/classpath/jdwp/processor/MethodCommandSet.java
@@ -1,5 +1,5 @@
/* MethodCommandSet.java -- class to implement the Method Command Set
- Copyright (C) 2005, 2006, 2007 Free Software Foundation
+ Copyright (C) 2005, 2006, 2007, 2013 Free Software Foundation
This file is part of GNU Classpath.
@@ -101,7 +101,7 @@ public class MethodCommandSet
throws JdwpException, IOException
{
ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
- Class clazz = refId.getType();
+ Class<?> clazz = refId.getType();
VMMethod method = VMMethod.readId(clazz, bb);
LineTable lt = method.getLineTable();
@@ -112,7 +112,7 @@ public class MethodCommandSet
throws JdwpException, IOException
{
ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
- Class clazz = refId.getType();
+ Class<?> clazz = refId.getType();
VMMethod method = VMMethod.readId(clazz, bb);
VariableTable vt = method.getVariableTable();
@@ -129,7 +129,7 @@ public class MethodCommandSet
}
ReferenceTypeId id = idMan.readReferenceTypeId(bb);
- Class klass = id.getType();
+ Class<?> klass = id.getType();
VMMethod method = VMMethod.readId(klass, bb);
byte[] bytecode = VMVirtualMachine.getBytecodes(method);
os.writeInt(bytecode.length);
diff --git a/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java
index f6bf8a656..fb22f7740 100644
--- a/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java
+++ b/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java
@@ -1,6 +1,6 @@
/* ObjectReferenceCommandSet.java -- class to implement the ObjectReference
Command Set
- Copyright (C) 2005, 2007 Free Software Foundation
+ Copyright (C) 2005, 2007, 2013 Free Software Foundation
This file is part of GNU Classpath.
@@ -117,7 +117,7 @@ public class ObjectReferenceCommandSet
{
ObjectId oid = idMan.readObjectId(bb);
Object obj = oid.getObject();
- Class clazz = obj.getClass();
+ Class<?> clazz = obj.getClass();
ReferenceTypeId refId = idMan.getReferenceTypeId(clazz);
refId.writeTagged(os);
}
@@ -211,7 +211,7 @@ public class ObjectReferenceCommandSet
Thread thread = (Thread) tid.getObject();
ReferenceTypeId rid = idMan.readReferenceTypeId(bb);
- Class clazz = rid.getType();
+ Class<?> clazz = rid.getType();
VMMethod method = VMMethod.readId(clazz, bb);
diff --git a/gnu/classpath/jdwp/processor/PacketProcessor.java b/gnu/classpath/jdwp/processor/PacketProcessor.java
index c4818aed8..785297c10 100644
--- a/gnu/classpath/jdwp/processor/PacketProcessor.java
+++ b/gnu/classpath/jdwp/processor/PacketProcessor.java
@@ -1,6 +1,6 @@
/* PacketProcessor.java -- a thread which processes command packets
from the debugger
- Copyright (C) 2005, 2006 Free Software Foundation
+ Copyright (C) 2005, 2006, 2013 Free Software Foundation
This file is part of GNU Classpath.
@@ -63,7 +63,7 @@ import java.security.PrivilegedAction;
* @author Keith Seitz (keiths@redhat.com)
*/
public class PacketProcessor
- implements PrivilegedAction
+ implements PrivilegedAction<Void>
{
// The connection to the debugger
private JdwpConnection _connection;
@@ -135,7 +135,7 @@ public class PacketProcessor
* Main run routine for this thread. Will loop getting packets
* from the connection and processing them.
*/
- public Object run ()
+ public Void run ()
{
// Notify initialization thread (gnu.classpath.jdwp.Jdwp) that
// the PacketProcessor thread is ready.
diff --git a/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java b/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
index 3489588df..ba4227fbe 100644
--- a/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
+++ b/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
@@ -1,6 +1,6 @@
/* ReferenceTypeCommandSet.java -- class to implement the ReferenceType
Command Set
- Copyright (C) 2005, 2006, 2007 Free Software Foundation
+ Copyright (C) 2005, 2006, 2007, 2013 Free Software Foundation
This file is part of GNU Classpath.
@@ -146,7 +146,7 @@ public class ReferenceTypeCommandSet
{
ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
- Class clazz = refId.getType();
+ Class<?> clazz = refId.getType();
ClassLoader loader = clazz.getClassLoader();
ObjectId oid = idMan.getObjectId(loader);
oid.write(os);
@@ -157,7 +157,7 @@ public class ReferenceTypeCommandSet
{
ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
- Class clazz = refId.getType();
+ Class<?> clazz = refId.getType();
os.writeInt(clazz.getModifiers());
}
@@ -165,7 +165,7 @@ public class ReferenceTypeCommandSet
throws JdwpException, IOException
{
ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
- Class clazz = refId.getType();
+ Class<?> clazz = refId.getType();
Field[] fields = clazz.getFields();
os.writeInt(fields.length);
@@ -183,7 +183,7 @@ public class ReferenceTypeCommandSet
throws JdwpException, IOException
{
ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
- Class clazz = refId.getType();
+ Class<?> clazz = refId.getType();
VMMethod[] methods = VMVirtualMachine.getAllClassMethods(clazz);
os.writeInt (methods.length);
@@ -201,7 +201,7 @@ public class ReferenceTypeCommandSet
throws JdwpException, IOException
{
ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
- Class clazz = refId.getType();
+ Class<?> clazz = refId.getType();
int numFields = bb.getInt();
os.writeInt(numFields); // Looks pointless but this is the protocol
@@ -209,7 +209,7 @@ public class ReferenceTypeCommandSet
{
ObjectId fieldId = idMan.readObjectId(bb);
Field field = (Field) (fieldId.getObject());
- Class fieldClazz = field.getDeclaringClass();
+ Class<?> fieldClazz = field.getDeclaringClass();
// We don't actually need the clazz to get the field but we might as
// well check that the debugger got it right
@@ -243,7 +243,7 @@ public class ReferenceTypeCommandSet
throws JdwpException, IOException
{
ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
- Class clazz = refId.getType();
+ Class<?> clazz = refId.getType();
// We'll need to go into the jvm for this unless there's an easier way
String sourceFileName = VMVirtualMachine.getSourceFile(clazz);
@@ -255,12 +255,12 @@ public class ReferenceTypeCommandSet
throws JdwpException, IOException
{
ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
- Class clazz = refId.getType();
- Class[] declaredClazzes = clazz.getDeclaredClasses();
+ Class<?> clazz = refId.getType();
+ Class<?>[] declaredClazzes = clazz.getDeclaredClasses();
os.writeInt(declaredClazzes.length);
for (int i = 0; i < declaredClazzes.length; i++)
{
- Class decClazz = declaredClazzes[i];
+ Class<?> decClazz = declaredClazzes[i];
ReferenceTypeId clazzId = idMan.getReferenceTypeId(decClazz);
clazzId.writeTagged(os);
}
@@ -270,7 +270,7 @@ public class ReferenceTypeCommandSet
throws JdwpException, IOException
{
ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
- Class clazz = refId.getType();
+ Class<?> clazz = refId.getType();
// I don't think there's any other way to get this
int status = VMVirtualMachine.getClassStatus(clazz);
@@ -281,12 +281,12 @@ public class ReferenceTypeCommandSet
throws JdwpException, IOException
{
ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
- Class clazz = refId.getType();
- Class[] interfaces = clazz.getInterfaces();
+ Class<?> clazz = refId.getType();
+ Class<?>[] interfaces = clazz.getInterfaces();
os.writeInt(interfaces.length);
for (int i = 0; i < interfaces.length; i++)
{
- Class interfaceClass = interfaces[i];
+ Class<?> interfaceClass = interfaces[i];
ReferenceTypeId intId = idMan.getReferenceTypeId(interfaceClass);
intId.write(os);
}
@@ -296,7 +296,7 @@ public class ReferenceTypeCommandSet
throws JdwpException, IOException
{
ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
- Class clazz = refId.getType();
+ Class<?> clazz = refId.getType();
ObjectId clazzObjectId = idMan.getObjectId(clazz);
clazzObjectId.write(os);
}
diff --git a/gnu/classpath/jdwp/processor/StackFrameCommandSet.java b/gnu/classpath/jdwp/processor/StackFrameCommandSet.java
index 2b82e05ff..115e6018e 100644
--- a/gnu/classpath/jdwp/processor/StackFrameCommandSet.java
+++ b/gnu/classpath/jdwp/processor/StackFrameCommandSet.java
@@ -1,5 +1,5 @@
/* StackFrameCommandSet.java -- class to implement the StackFrame Command Set
- Copyright (C) 2005, 2007 Free Software Foundation
+ Copyright (C) 2005, 2007, 2013 Free Software Foundation
This file is part of GNU Classpath.
@@ -65,7 +65,6 @@ public class StackFrameCommandSet
public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
throws JdwpException
{
- boolean keepRunning = true;
try
{
switch (command)
diff --git a/gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java
index 2bbff44de..cc657dc5d 100644
--- a/gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java
+++ b/gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java
@@ -1,5 +1,5 @@
/* ThreadReferenceCommandSet.java -- class to implement the ThreadReference
- Command Set Copyright (C) 2005, 2007 Free Software Foundation
+ Command Set Copyright (C) 2005, 2007, 2013 Free Software Foundation
This file is part of GNU Classpath.
@@ -176,11 +176,14 @@ public class ThreadReferenceCommandSet
int startFrame = bb.getInt();
int length = bb.getInt();
- ArrayList frames = VMVirtualMachine.getFrames(thread, startFrame, length);
+ // VMWARN: Suppress warning until VM layer is upgraded to generics
+ @SuppressWarnings("unchecked")
+ ArrayList<VMFrame> frames =
+ VMVirtualMachine.getFrames(thread, startFrame, length);
os.writeInt(frames.size());
for (int i = 0; i < frames.size(); i++)
{
- VMFrame frame = (VMFrame) frames.get(i);
+ VMFrame frame = frames.get(i);
os.writeLong(frame.getId());
Location loc = frame.getLocation();
loc.write(os);
diff --git a/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java b/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
index c476a04e9..ef0323568 100644
--- a/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
+++ b/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
@@ -1,6 +1,6 @@
/* VirtualMachineCommandSet.java -- class to implement the VirtualMachine
Command Set
- Copyright (C) 2005, 2006, 2007 Free Software Foundation
+ Copyright (C) 2005, 2006, 2007, 2013 Free Software Foundation
This file is part of GNU Classpath.
@@ -177,15 +177,17 @@ public class VirtualMachineCommandSet
throws JdwpException, IOException
{
String sig = JdwpString.readString(bb);
- ArrayList allMatchingClasses = new ArrayList();
+ ArrayList<Class<?>> allMatchingClasses = new ArrayList<Class<?>>();
// This will be an Iterator over all loaded Classes
- Collection classes = VMVirtualMachine.getAllLoadedClasses();
- Iterator iter = classes.iterator ();
+ // VMWARN: Suppress warning until VM layer is upgraded to generics
+ @SuppressWarnings("unchecked")
+ Collection<Class<?>> classes = VMVirtualMachine.getAllLoadedClasses();
+ Iterator<Class<?>> iter = classes.iterator ();
while (iter.hasNext())
{
- Class clazz = (Class) iter.next();
+ Class<?> clazz = iter.next();
String clazzSig = Signature.computeClassSignature(clazz);
if (clazzSig.equals(sig))
allMatchingClasses.add(clazz);
@@ -194,7 +196,7 @@ public class VirtualMachineCommandSet
os.writeInt(allMatchingClasses.size());
for (int i = 0; i < allMatchingClasses.size(); i++)
{
- Class clazz = (Class) allMatchingClasses.get(i);
+ Class<?> clazz = allMatchingClasses.get(i);
ReferenceTypeId id = idMan.getReferenceTypeId(clazz);
id.writeTagged(os);
int status = VMVirtualMachine.getClassStatus(clazz);
@@ -205,13 +207,15 @@ public class VirtualMachineCommandSet
private void executeAllClasses(ByteBuffer bb, DataOutputStream os)
throws JdwpException, IOException
{
- Collection classes = VMVirtualMachine.getAllLoadedClasses();
+ // VMWARN: Suppress warning until VM layer is upgraded to generics
+ @SuppressWarnings("unchecked")
+ Collection<Class<?>> classes = VMVirtualMachine.getAllLoadedClasses();
os.writeInt(classes.size ());
- Iterator iter = classes.iterator ();
+ Iterator<Class<?>> iter = classes.iterator ();
while (iter.hasNext())
{
- Class clazz = (Class) iter.next();
+ Class<?> clazz = iter.next();
ReferenceTypeId id = idMan.getReferenceTypeId(clazz);
id.writeTagged(os);
String sig = Signature.computeClassSignature(clazz);
@@ -419,7 +423,7 @@ public class VirtualMachineCommandSet
}
int classes = bb.getInt();
- Class[] types = new Class[classes];
+ Class<?>[] types = new Class<?>[classes];
byte[][] bytecodes = new byte[classes][];
for (int i = 0; i < classes; ++i)
{