-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: User-controlled data in numeric cast [#1987] #1996
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1996 +/- ##
============================================
- Coverage 70.59% 70.50% -0.09%
- Complexity 976 978 +2
============================================
Files 454 454
Lines 39050 39051 +1
Branches 5557 5557
============================================
- Hits 27568 27534 -34
- Misses 8785 8818 +33
- Partials 2697 2699 +2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
hugegraph-core/src/protobuf/java/com/baidu/hugegraph/backend/store/raft/rpc/RaftRequests.java
Outdated
Show resolved
Hide resolved
@@ -67,7 +67,7 @@ public String get(@Context GraphManager manager, | |||
@QueryParam("max_degree") | |||
@DefaultValue(DEFAULT_MAX_DEGREE) long maxDegree, | |||
@QueryParam("limit") | |||
@DefaultValue(DEFAULT_ELEMENTS_LIMIT) long limit) { | |||
@DefaultValue(DEFAULT_ELEMENTS_LIMIT) int limit) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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~
There was a problem hiding this comment.
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
@@ -149,7 +153,7 @@ public void master(StateMachineContext context) { | |||
if (logRecords.size() > MAX_COUNT) { | |||
context.stateMachine().shutdown(); | |||
} | |||
System.out.println("master node: " + node); | |||
LOG.info("master node: " + node); |
There was a problem hiding this comment.
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
No description provided.