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

Update methods argument classes #2130

Merged
merged 1 commit into from Sep 12, 2023

Conversation

rmoreliovlabs
Copy link
Contributor

Description

Updating arguments types for methods listed on CORE-3130

Motivation and Context

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • Tests for the changes have been added (for bug fixes / features)
  • Requires Activation Code (Hard Fork)
  • Other information:

@sonarcloud
Copy link

sonarcloud bot commented Sep 11, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

92.6% 92.6% Coverage
0.0% 0.0% Duplication

@@ -5,6 +5,10 @@

public abstract class HexStringParam {
HexStringParam(String hexString) {
if(hexString.isEmpty()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

should we check if it's null?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I will add that.

@@ -5,6 +5,10 @@

public abstract class HexStringParam {
HexStringParam(String hexString) {
if(hexString.isEmpty()) {
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

should we throw an error instead if it's null or empty?

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 left that behevior to the other classes that extends from this one, like HexDurationParam, which should not throw an error if the value is null since the methods using them behave different depending on that.

@Vovchyk Vovchyk merged commit 4ad802d into json_rpc_param_validation Sep 12, 2023
6 checks passed
@Vovchyk Vovchyk deleted the json_rpc_param_validation_pt3 branch September 12, 2023 15:57
@aeidelman aeidelman added this to the Fingerroot 5.4.0 milestone Jan 23, 2024
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.

None yet

3 participants