fix: User-controlled data in numeric cast [#1987] by zyxxoo · Pull Request #1996 · apache/hugegraph
| @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
| 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters