aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.java')
-rw-r--r--libjava/classpath/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.java18
1 files changed, 7 insertions, 11 deletions
diff --git a/libjava/classpath/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.java b/libjava/classpath/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.java
index 7190317a4ae..a3125371c5d 100644
--- a/libjava/classpath/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.java
+++ b/libjava/classpath/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.java
@@ -1,5 +1,5 @@
/* LocationOnlyFilter.java -- filter on location
- Copyright (C) 2005, 2006 Free Software Foundation
+ Copyright (C) 2005, 2006, 2007 Free Software Foundation
This file is part of GNU Classpath.
@@ -49,13 +49,6 @@ import gnu.classpath.jdwp.util.Location;
* May be used with breakpoint, field access, field modification, step,
* and exception event kinds.
*
- * This "filter" is not really a filter. It is simply a way to communicate
- * location information for supported events in a generic way to ease
- * the burden of special casing several things in
- * EventReqeustCommandSet.executeSet.
- *
- * Consequently, this "filter" always matches any event.
- *
* @author Keith Seitz (keiths@redhat.com)
*/
public class LocationOnlyFilter
@@ -90,9 +83,12 @@ public class LocationOnlyFilter
*
* @param event the <code>Event</code> to scrutinize
*/
- public boolean matches (Event event)
+ public boolean matches(Event event)
{
- // This filter always matches. See comments in class javadoc.
- return true;
+ Location loc = (Location) event.getParameter(Event.EVENT_LOCATION);
+ if (loc != null)
+ return (getLocation().equals(loc));
+
+ return false;
}
}