Skip to content
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

Merged
merged 7 commits into from
Oct 30, 2022
Merged

fix: User-controlled data in numeric cast [#1987] #1996

merged 7 commits into from
Oct 30, 2022

Conversation

zyxxoo
Copy link
Contributor

@zyxxoo zyxxoo commented Oct 30, 2022

No description provided.

@zyxxoo zyxxoo requested review from javeme and imbajin October 30, 2022 08:56
@codecov
Copy link

codecov bot commented Oct 30, 2022

Codecov Report

Merging #1996 (c10f584) into master (c1d32a8) will decrease coverage by 0.08%.
The diff coverage is 52.38%.

@@             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     
Impacted Files Coverage Δ
...api/src/main/java/com/baidu/hugegraph/api/API.java 74.11% <ø> (ø)
...n/java/com/baidu/hugegraph/api/auth/AccessAPI.java 0.00% <ø> (ø)
...n/java/com/baidu/hugegraph/api/auth/BelongAPI.java 0.00% <ø> (ø)
...in/java/com/baidu/hugegraph/api/auth/GroupAPI.java 0.00% <ø> (ø)
...in/java/com/baidu/hugegraph/api/auth/LoginAPI.java 74.28% <ø> (ø)
.../java/com/baidu/hugegraph/api/auth/ProjectAPI.java 82.05% <ø> (ø)
...n/java/com/baidu/hugegraph/api/auth/TargetAPI.java 0.00% <ø> (ø)
...ain/java/com/baidu/hugegraph/api/auth/UserAPI.java 75.80% <ø> (ø)
...aidu/hugegraph/api/filter/CompressInterceptor.java 73.07% <ø> (ø)
.../java/com/baidu/hugegraph/api/job/ComputerAPI.java 0.00% <ø> (ø)
... and 54 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -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) {
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Copy link
Member

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~

Copy link
Contributor Author

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);
Copy link
Contributor

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 mentioned this pull request Oct 30, 2022
@zyxxoo zyxxoo merged commit 66b1674 into master Oct 30, 2022
@zyxxoo zyxxoo deleted the zy_dev branch October 30, 2022 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants