fix: User-controlled data in numeric cast [#1987] by zyxxoo · Pull Request #1996 · apache/hugegraph

@zyxxoo

@codecov

javeme

@DefaultValue(DEFAULT_MAX_DEGREE) long maxDegree,
@QueryParam("limit")
@DefaultValue(DEFAULT_ELEMENTS_LIMIT) long limit) {
@DefaultValue(DEFAULT_ELEMENTS_LIMIT) int limit) {

Choose a reason for hiding this comment

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

do all the algorithms(like adamicAdar) need to param limit with type int?

Choose a reason for hiding this comment

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

Ok, I change the other algorithms limit type to int

Choose a reason for hiding this comment

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

These place long are not suitable, because the java package only support int type on collections

Choose a reason for hiding this comment

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

yes,I also found this problem~

Choose a reason for hiding this comment

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

I have change all algorithms limit type long to int, and I have put a pr for hugegraph-client

@zyxxoo

@zyxxoo

@zyxxoo

@zyxxoo

javeme

context.stateMachine().shutdown();
}
System.out.println("master node: " + node);
LOG.info("master node: " + node);

Choose a reason for hiding this comment

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

prefer to define a UtilXx.print() method

@zyxxoo

@zyxxoo

javeme

@imbajin

imbajin