Fix forced to Double and optimization error hint for top range by zyxxoo · Pull Request #1432 · apache/hugegraph

@zyxxoo

fix error hit and Integer case to Double

Linary

@zyxxoo zyxxoo changed the title Zy dev Fix forced to Double and optimization error hint for top range

Apr 27, 2021

@codecov

@zyxxoo

@zyxxoo

@zyxxoo

zhoney

Linary

javeme

long degree, long skipDegree, int top, int capacity) {
E.checkArgument(top > 0 && top <= MAX_TOP,
"The top of each layer can't exceed %s", MAX_TOP);
"The top of each layer must be in (0, %s]",

Choose a reason for hiding this comment

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

perfect if prompt the actual top value

return edgeWeight;
}

private double toDouble(Object obj) {

Choose a reason for hiding this comment

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

set static

return ((Number) obj).doubleValue();
}

return (double) obj;

Choose a reason for hiding this comment

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

prefer to call NumericUtil.toNumber(obj).doubleValue()

zhoney pushed a commit that referenced this pull request

May 27, 2021

@zyxxoo @zhoney