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

Replace code with working one #5

Merged
merged 1 commit into from Mar 5, 2021
Merged

Replace code with working one #5

merged 1 commit into from Mar 5, 2021

Conversation

ljmatan
Copy link
Contributor

@ljmatan ljmatan commented Mar 4, 2021

No need to wrap tryParse in try as long as the value provided is not null, which we've covered in the first clause. Moreover, code doesn't actually check whether a number is provided as int.tryParse(oib.substring(i, i + 1)) ?? 0 returns 0 if value is not numerical. Function name was in English and variables were in Croatian, among other issues with their names.

No need to wrap tryParse in try as long as the value provided is not null, which we've covered in the first clause. Moreover, code doesn't actually check whether a number is provided - int.tryParse(oib.substring(i, i + 1)) ?? 0 returns 0 if value is not numerical. Function name was in English and variables were in Croatian, among other issues with their names.
@domagojpa domagojpa merged commit 4710ab2 into domagojpa:main Mar 5, 2021
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

2 participants