Skip to content

Silly questions about MessageConsumerImpl, HandlerRegistration #4836

Description

@magicprinc

io.vertx.core.eventbus.impl.MessageConsumerImpl is a subclass of io.vertx.core.eventbus.impl.HandlerRegistration

Both have the same fields:

  public final ContextInternal context;
  public final EventBusImpl bus;
  public final String address;

and

  private final ContextInternal context;
  private final EventBusImpl eventBus;
  private final String address;

Is there a secret byte-code optimization reason?

  1. MessageConsumerImpl
  private Queue<Message<T>> pending = new ArrayDeque<>(8);

but in unregister() it is

   pending = new ArrayDeque<>();
  1. protected boolean doReceive(... doesn't have @OverRide

  2. Spelling
    This class is optimized

  3. header is simple comment, not javadoc
    /* not /**

PR:
#4847

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions