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 usages of deprecated constructor Integer(String) with Integer.parseInt #1259

Merged
merged 1 commit into from
Jul 4, 2022

Conversation

PhilipRoman
Copy link
Collaborator

Description

Replace usages of deprecated constructor Integer(String) with Integer.parseInt

Motivation and Context

https://docs.oracle.com/javase/9/docs/api/java/lang/Integer.html#Integer-java.lang.String-

@Deprecated(since="9")
public Integer​(String s)
     throws NumberFormatException
Deprecated. It is rarely appropriate to use this constructor. Use parseInt(String) to convert a string to a int primitive, or use valueOf(String) to convert a string to an Integer object.

How Has This Been Tested?

Tests work same as before

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 change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@PhilipRoman PhilipRoman merged commit aad6654 into master Jul 4, 2022
@PhilipRoman PhilipRoman deleted the replace-deprecated-integer-constructor branch July 4, 2022 17:13
@marci4 marci4 added this to the Release 1.5.4 milestone Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants