Skip to content
This repository was archived by the owner on Oct 13, 2024. It is now read-only.

[SCB-452] Write java doc for some class and some refactoring.#166

Merged
WillemJiang merged 4 commits intoapache:masterfrom
chanjarster:SCB-452
Apr 2, 2018
Merged

[SCB-452] Write java doc for some class and some refactoring.#166
WillemJiang merged 4 commits intoapache:masterfrom
chanjarster:SCB-452

Conversation

@chanjarster
Copy link
Member

@chanjarster chanjarster commented Apr 1, 2018

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a JIRA issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [SCB-XXX] Fixes bug in ApproximateQuantiles, where you replace SCB-XXX with the appropriate JIRA issue.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean install to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

…dTxStartedEvent.

The "ToCompensate" phrase in the original method name doesn't match the underlying code logic.
… method

Change method signature from findFirstCompensatedEventByIdGreaterThan(long id, String type) to
findFirstCompensatedEventByIdGreaterThan(long id).

The purpose of this method implied by name is to find a TxCompensatedEvent, so the type param is redundant.
…terThan()

Change method signature from
  List<TxEvent> findFirstUncompensatedEventByIdGreaterThan(long id, String type);
to
  Optional<TxEvent> findFirstUncompensatedEventByIdGreaterThan(long id);

Reasons:

1. this method named "findFirst" and it always returns a list with 1 element
   or an empty list, so it's better to return Optional<>.
2. this method try to find a TxEndedEvent which is aborted but not compensated, so
   the parameter type should not be exposed to callers, it should be in internal
   query logic.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) to 95.301% when pulling 1697043 on chanjarster:SCB-452 into 79e132c on apache:master.

Copy link
Member

@WillemJiang WillemJiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Daniel, Thanks to go through the code by adding java doc.

@WillemJiang WillemJiang merged commit 7de3915 into apache:master Apr 2, 2018
@chanjarster chanjarster deleted the SCB-452 branch April 2, 2018 05:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants