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

Move clone out of private constructor to required places #792

Merged
merged 1 commit into from Mar 27, 2019

Conversation

Projects
None yet
5 participants
@lsebrie
Copy link
Contributor

commented Mar 25, 2019

The cloneArray call is removed from private constructor, instead is moved to specific places where is needed. Looking at each use of the constructor, the call should be only used inside internalPut when the value comes as a parameter. #790

@lsebrie lsebrie force-pushed the reduce_clones branch from 0e3ad4c to 8fdc858 Mar 25, 2019

@lsebrie lsebrie force-pushed the reduce_clones branch from 8fdc858 to 7a3e3e3 Mar 25, 2019

@tinchou
Copy link
Contributor

left a comment

You are awesome

@tinchou

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2019

fixes #790

@rskops

This comment has been minimized.

Copy link

commented Mar 25, 2019

SonarQube analysis reported 10 issues

  1. MAJOR Trie.java#L130: The Cyclomatic Complexity of this method "fromMessage" is 11 which is greater than 10 authorized. rule
  2. MAJOR Trie.java#L447: Return an empty array instead of null. rule
  3. MAJOR Trie.java#L452: Return an empty array instead of null. rule
  4. MAJOR Trie.java#L461: Return an empty array instead of null. rule
  5. MAJOR Trie.java#L576: The Cyclomatic Complexity of this method "internalPut" is 11 which is greater than 10 authorized. rule
  6. MAJOR Trie.java#L717: Return an empty array instead of null. rule
  7. MINOR Trie.java#L56: Use already-defined constant 'PANIC_TOPIC' instead of duplicating its value here. rule
  8. MINOR Trie.java#L105: Store a copy of "value". rule
  9. MINOR Trie.java#L456: Return a copy of "value". rule
  10. INFO Trie.java#L684: Class co.rsk.trie.Trie 'overloads' a method with both instance and static versions rule

@diega diega merged commit 0bd5c2a into master Mar 27, 2019

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
default Build finished.
Details
sonarqube SonarQube reported 10 issues, no criticals or blockers

@diega diega deleted the reduce_clones branch Mar 27, 2019

@aeidelman aeidelman added this to the Orchid v0.6.2 milestone Apr 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.