Index: gnu/classpath/jdwp/event/filters/ClassMatchFilter.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/classpath/jdwp/event/filters/ClassMatchFilter.java,v
retrieving revision 1.1
diff -u -r1.1 ClassMatchFilter.java
--- gnu/classpath/jdwp/event/filters/ClassMatchFilter.java 26 Aug 2005 21:52:28 -0000 1.1
+++ gnu/classpath/jdwp/event/filters/ClassMatchFilter.java 4 Sep 2005 18:40:56 -0000
@@ -95,26 +95,18 @@
Object type = event.getParameter (ReferenceTypeId.class);
if (type != null)
{
- try
+ Class eventClass = (Class) type;
+ String name = eventClass.getName ();
+
+ if (_pattern.startsWith ("*"))
+ return name.endsWith (_pattern.substring (1));
+ else if (_pattern.endsWith ("*"))
{
- Class eventClass = (Class) type;
- String name = eventClass.getName ();
-
- if (_pattern.startsWith ("*"))
- return name.endsWith (_pattern.substring (1));
- else if (_pattern.endsWith ("*"))
- {
- int end = _pattern.length () - 1;
- return name.startsWith (_pattern.substring (0, end));
- }
- else
- return name.matches (_pattern);
- }
- catch (InvalidClassException ice)
- {
- // the class is no longer valid
- return false;
+ int end = _pattern.length () - 1;
+ return name.startsWith (_pattern.substring (0, end));
}
+ else
+ return name.matches (_pattern);
}
return false;
Index: vm/reference/gnu/classpath/jdwp/VMIdManager.java
===================================================================
RCS file: /cvsroot/classpath/classpath/vm/reference/gnu/classpath/jdwp/VMIdManager.java,v
retrieving revision 1.2
diff -u -r1.2 VMIdManager.java
--- vm/reference/gnu/classpath/jdwp/VMIdManager.java 25 Aug 2005 00:47:49 -0000 1.2
+++ vm/reference/gnu/classpath/jdwp/VMIdManager.java 4 Sep 2005 18:40:56 -0000
@@ -170,35 +170,27 @@
* Returns a new reference type id for the given class
*
* @param clazz the Class
for which an id is desired
- * @returns a suitable reference type id or null
+ * @returns a suitable reference type id or null when the
+ * reference is cleared.
*/
public static ReferenceTypeId newReferenceTypeId (SoftReference ref)
{
- ReferenceTypeId id = null;
+ ReferenceTypeId id;
Class clazz = (Class) ref.get ();
+ if (clazz == null)
+ return null;
- try
+ if (clazz.isArray ())
+ id = new ArrayReferenceTypeId ();
+ else if (clazz.isInterface ())
+ id = new InterfaceReferenceTypeId ();
+ else
+ id = new ClassReferenceTypeId ();
+ synchronized (_ridLock)
{
- if (clazz.isArray ())
- id = new ArrayReferenceTypeId ();
- else if (clazz.isInterface ())
- id = new InterfaceReferenceTypeId ();
- else
- id = new ClassReferenceTypeId ();
- synchronized (_ridLock)
- {
- id.setId (++_lastRid);
- }
- return id;
- }
- catch (InstantiationException ie)
- {
- return null;
- }
- catch (IllegalAccessException iae)
- {
- return null;
+ id.setId (++_lastRid);
}
+ return id;
}
}