Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup event generics #27

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Nov 17, 2014

  1. Subscriptions: improve usage of Java generics

    * Parametrize Notification with generic argument
    * Use proper generic types instead of <?> wherever possible on
      Subscription and Notification
    * Reduce the amount of (now unnecessary) casting
    * Don't write Subscription<? extends EventSource>: the EventType is not
      exposed directly anywhere and there cannot exist any Subscription
      where the EventType does not extend EventSource, given the class
      signature of Subscription. Write Subscription<?> instead when the
      EventType is not known.
    * Classes are of type Class<? extends XXX> where XXX is the non-generic
      superclass of XXX<?>. Hence there is no need to ever write
      Class<? extends XXX<?>>, and doing so requires unchecked casts all
      over the place.
    bertm committed Nov 17, 2014
    Configuration menu
    Copy the full SHA
    8723469 View commit details
    Browse the repository at this point in the history
  2. Subscriptions: move notifySubscriberByFCP to Notification

    The Notification has knowledge of which FCP method to invoke. Moving
    this responsibility to Notification instead of the Subscription
    considerably reduces the amount of FCP related code duplication and
    number of instanceof checks.
    bertm committed Nov 17, 2014
    Configuration menu
    Copy the full SHA
    11f690f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a2343cf View commit details
    Browse the repository at this point in the history