Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

fix: startSortKey can't pass null #108

Merged
merged 5 commits into from
May 21, 2020

Conversation

foreverneverer
Copy link
Contributor

@foreverneverer foreverneverer commented May 20, 2020

startSortKey should support pass null

  public void delRange(
      byte[] hashKey, byte[] startSortKey, byte[] stopSortKey, DelRangeOptions options, int timeout)
      throws PException {
    ScanOptions scanOptions = new ScanOptions();
    scanOptions.noValue = true;
    scanOptions.startInclusive = options.startInclusive;
    scanOptions.stopInclusive = options.stopInclusive;
    scanOptions.sortKeyFilterType = options.sortKeyFilterType;
    scanOptions.sortKeyFilterPattern = options.sortKeyFilterPattern;

    options.nextSortKey = new String(startSortKey);
public class DelRangeOptions {
  public String nextSortKey = "";

Because DelRangeOptions.nextSortKey was a string, if startSortKey was passed null, new String(null) will throw NullPointerException.

Besides, this pr update junit4 to junit5 for simplying unit code, for example, support test exception method, see junit5

@levy5307 levy5307 merged commit 717eefe into XiaoMi:thrift-0.11.0-inlined May 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants