Skip to content

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

Merged
PhilipRoman merged 1 commit into
masterfrom
replace-deprecated-integer-constructor
Jul 4, 2022
Merged

Replace usages of deprecated constructor Integer(String) with Integer.parseInt#1259
PhilipRoman merged 1 commit into
masterfrom
replace-deprecated-integer-constructor

Conversation

@PhilipRoman

Copy link
Copy Markdown
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