Skip to content

Conversation

@celinayk
Copy link
Contributor

What is this PR for?

This PR removes usages of deprecated Number constructors (e.g., new Integer(), new Double(), new Long()) and replaces them with factory methods such as valueOf() or parseXxx() methods.
The goal is to improve Java 11 compatibility and eliminate compiler warnings related to deprecated APIs.

What type of PR is it?

Refactoring

Todos

  • - Replace deprecated constructors
  • - Verify compatibility with Java 11

What is the Jira issue?

ZEPPELIN-6276

How should this be tested?

Screenshots (if appropriate)

Questions:

  • Does the license files need to update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

@celinayk celinayk changed the title ZEPPELIN-6276: Replace Deprecated Number Constructors for Java 11 [ZEPPELIN-6276]: Replace Deprecated Number Constructors for Java 11 Aug 16, 2025
@celinayk celinayk force-pushed the feature/replace-constructors branch from c7cb1b8 to 7303e7a Compare August 16, 2025 04:30
@celinayk celinayk changed the title [ZEPPELIN-6276]: Replace Deprecated Number Constructors for Java 11 [ZEPPELIN-6276] Replace Deprecated Number Constructors for Java 11 Aug 16, 2025
@Reamer
Copy link
Contributor

Reamer commented Aug 16, 2025

Thank you for your contribution. I only found one small thing that can be directly improved in this PR.

@celinayk
Copy link
Contributor Author

Thank you for your contribution. I only found one small thing that can be directly improved in this PR.

Thanks for the review! Fixed to catch only NumberFormatException.

Copy link
Contributor

@Reamer Reamer left a comment

Choose a reason for hiding this comment

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

LGTM, let's wait for CI

@Reamer Reamer self-assigned this Aug 19, 2025
Copy link
Contributor

@ParkGyeongTae ParkGyeongTae left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@Reamer Reamer merged commit 27e9b8f into apache:master Aug 19, 2025
17 of 18 checks passed
asf-gitbox-commits pushed a commit that referenced this pull request Aug 19, 2025
### What is this PR for?
This PR removes usages of deprecated Number constructors (e.g., `new Integer()`, `new Double()`, `new Long()`) and replaces them with factory methods such as `valueOf()` or `parseXxx()` methods.
The goal is to improve Java 11 compatibility and eliminate compiler warnings related to deprecated APIs.

### What type of PR is it?
Refactoring

### Todos
* [x] - Replace deprecated constructors
* [x] - Verify compatibility with Java 11

### What is the Jira issue?
[ZEPPELIN-6276](https://issues.apache.org/jira/browse/ZEPPELIN-6276)

### How should this be tested?

### Screenshots (if appropriate)

### Questions:
* Does the license files need to update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Closes #5027 from celinayk/feature/replace-constructors.

Signed-off-by: Philipp Dallig <[email protected]>
(cherry picked from commit 27e9b8f)
Signed-off-by: Philipp Dallig <[email protected]>
@Reamer
Copy link
Contributor

Reamer commented Aug 19, 2025

Merged into master and branch-0.12

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.

3 participants