Bug #1903

TypeFilter.java filters everything

Added by V. Richter almost 10 years ago. Updated almost 9 years ago.

Status:ResolvedStart date:06/27/2014
Priority:NormalDue date:
Assignee:J. Wienke% Done:

100%

Category:Java
Target version:rsb-0.13

Description

In rsb.filter.TypeFilter.java:79 the check should be.

        if (this.type.isAssignableFrom(event.getData().getClass()))

Associated revisions

Revision 19babddf
Added by J. Wienke almost 9 years ago

Clean up filter interface

This commit adapts the ancient Filter interface to the API of the other
language implementations. The AbstractFilter class has been marked
deprecated in favor of directly implementing the Filter interface.
Filters now only support indicating whether an event matches instead of
allowing arbitrary transformations (which were never internally
supported). Also, the old FilterAction.UPDATE was deprecated since it was
never supported. The deprecated AbstractFilter class tries to preserve
the old interface, but newer client-contributed filters should not use
this class anymore since it will be removed at some point in time.

  • src/rsb/FilteringHandler.java: use new Filter API
  • src/rsb/eventprocessing/MatchAndDispatchTask.java: likewise
  • src/rsb/eventprocessing/SingleThreadEventReceivingStrategy.java:
    likewise
  • src/rsb/filter/AbstractFilter.java: deprecated, preserve old API
  • src/rsb/filter/AbstractFilterObserver.java: deprecated since double
    dispatch is not needed in java with reflection support. Preserves old
    API.
  • src/rsb/filter/Filter.java: adapted to a single match method
  • src/rsb/filter/FilterAction.java: deprecated UPDATE action
  • src/rsb/filter/FilterObservable.java: code cleanup and API refinements
  • src/rsb/filter/FilterObserver.java: double dispatch removed
  • src/rsb/filter/MethodFilter.java: base on Filter directly
  • src/rsb/filter/OriginFilter.java: likewise
  • src/rsb/filter/ScopeFilter.java: likewise
  • src/rsb/filter/TypeFilter.java: likewise, filter condition fixed,
    fixes #1903
  • test/rsb/filter/FilterObservableTest.java: adapted to API and extended
  • test/rsb/filter/MethodFilterTest.java: adapted to new API
  • test/rsb/filter/OriginFilterTest.java: adapted to new API
  • test/rsb/filter/ScopeFilterTest.java: adapted to new API
  • test/rsb/filter/TypeFilterTest.java: new test, for #1903

History

#1 Updated by J. Wienke almost 9 years ago

  • Category set to Java
  • Status changed from New to In Progress
  • Assignee set to J. Wienke
  • Target version set to rsb-0.13

#2 Updated by J. Wienke almost 9 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF