2006-06-13 Kyle Galloway <[EMAIL PROTECTED]>
* gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java: Allow
null refId.
Keith Seitz wrote:
Kyle Galloway wrote:
The part that was removed upon commit actually introduced some logic
changes to the constructor to allow it to filter on all exceptions.
Here is another patch to correct the committed file.
2006-06-13 Kyle Galloway <[EMAIL PROTECTED]>
* gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java: Changed
the constructor to allow null to be passed signifying all exceptions
should be allowed.
This change was not mentioned in the previous changelog, and I
overlooked it entirely. Sorry.
I would trim your changelog comment to say something simple like
"Allow null refId." or some such and put the detailed explanation into
a comment in the constructor's javadoc.
------------------------------------------------------------------------
Index: ExceptionOnlyFilter.java
===================================================================
RCS file:
/sources/classpath/classpath/gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java,v
retrieving revision 1.3
diff -u -r1.3 ExceptionOnlyFilter.java
--- ExceptionOnlyFilter.java 12 Jun 2006 20:39:16 -0000 1.3
+++ ExceptionOnlyFilter.java 13 Jun 2006 13:47:21 -0000
@@ -70,8 +70,8 @@
boolean uncaught)
throws InvalidClassException
{
- if (refId == null || refId.getReference().get () == null)
- throw new InvalidClassException (refId.getId ());
+ if (refId != null && refId.getReference().get() == null)
+ throw new InvalidClassException(refId.getId());
_refId = refId;
_caught = caught;
Aside from updating the javadoc to mention the null refId thing, this
looks good.
Keith
Index: ExceptionOnlyFilter.java
===================================================================
RCS file: /sources/classpath/classpath/gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java,v
retrieving revision 1.3
diff -u -r1.3 ExceptionOnlyFilter.java
--- ExceptionOnlyFilter.java 12 Jun 2006 20:39:16 -0000 1.3
+++ ExceptionOnlyFilter.java 13 Jun 2006 15:13:14 -0000
@@ -61,7 +61,7 @@
/**
* Constructs a new ExceptionOnlyFilter
*
- * @param refId ID of the exception to report
+ * @param refId ID of the exception to report(null for all exceptions)
* @param caught Report caught exceptions
* @param uncaught Report uncaught exceptions
* @throws InvalidClassException if refid is invalid
@@ -70,8 +70,8 @@
boolean uncaught)
throws InvalidClassException
{
- if (refId == null || refId.getReference().get () == null)
- throw new InvalidClassException (refId.getId ());
+ if (refId != null && refId.getReference().get() == null)
+ throw new InvalidClassException(refId.getId());
_refId = refId;
_caught = caught;