You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@zeppelin.apache.org by "celinayk (via GitHub)" <gi...@apache.org> on 2025/08/16 04:23:32 UTC
[PR] ZEPPELIN-6276: Replace Deprecated Number Constructors for Java 11 [zeppelin]
celinayk opened a new pull request, #5027:
URL: https://github.com/apache/zeppelin/pull/5027
### 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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6276] Replace Deprecated Number Constructors for Java 11 [zeppelin]
Posted by "Reamer (via GitHub)" <gi...@apache.org>.
Reamer commented on PR #5027:
URL: https://github.com/apache/zeppelin/pull/5027#issuecomment-3200977960
Merged into master and branch-0.12
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6276] Replace Deprecated Number Constructors for Java 11 [zeppelin]
Posted by "Reamer (via GitHub)" <gi...@apache.org>.
Reamer commented on PR #5027:
URL: https://github.com/apache/zeppelin/pull/5027#issuecomment-3193825075
Thank you for your contribution. I only found one small thing that can be directly improved in this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6276] Replace Deprecated Number Constructors for Java 11 [zeppelin]
Posted by "celinayk (via GitHub)" <gi...@apache.org>.
celinayk commented on PR #5027:
URL: https://github.com/apache/zeppelin/pull/5027#issuecomment-3194191890
> 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6276] Replace Deprecated Number Constructors for Java 11 [zeppelin]
Posted by "Reamer (via GitHub)" <gi...@apache.org>.
Reamer commented on code in PR #5027:
URL: https://github.com/apache/zeppelin/pull/5027#discussion_r2280528818
##########
zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/KerberosInterpreter.java:
##########
@@ -95,7 +95,7 @@ private Integer kinitFailThreshold() {
//defined in zeppelin-env.sh, if not initialized then the default value is 5.
if (System.getenv("KINIT_FAIL_THRESHOLD") != null) {
try {
- kinitFailThreshold = new Integer(System.getenv("KINIT_FAIL_THRESHOLD"));
+ kinitFailThreshold = Integer.valueOf(System.getenv("KINIT_FAIL_THRESHOLD"));
} catch (Exception e) {
Review Comment:
Please only catch the NumberFormatException here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6276] Replace Deprecated Number Constructors for Java 11 [zeppelin]
Posted by "Reamer (via GitHub)" <gi...@apache.org>.
Reamer merged PR #5027:
URL: https://github.com/apache/zeppelin/pull/5027
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org