Skip to content

[ZEPPELIN-6246] Replace deprecated Character constructor#4979

Merged
Reamer merged 1 commit into
apache:masterfrom
hyunw9:ZEPPELIN-6246
Jul 17, 2025
Merged

[ZEPPELIN-6246] Replace deprecated Character constructor#4979
Reamer merged 1 commit into
apache:masterfrom
hyunw9:ZEPPELIN-6246

Conversation

@hyunw9

@hyunw9 hyunw9 commented Jul 16, 2025

Copy link
Copy Markdown
Contributor

What is this PR for?

In the following file zeppelin/file/src/main/java/org/apache/zeppelin/file/HDFSFileInterpreter.java

The Character constructor is deprecated in Java 9 and later, recommending the use of the static factory method Character.valueOf() instead.

This change's objective is to update the code to use the modern recommended approach.

As-is

 if (args.flags.contains(new Character('l'))) {

To-be

if (args.flags.contains(Character.valueOf('l'))) {

Also, Changed single word's type from "" -> ''

What type of PR is it?

Refactoring

Todos

  • - Replace deprecated Character constructor
  • - Change single word's data type

What is the Jira issue?

  • Open an issue on Jira

How should this be tested?

  • Strongly recommended: add automated unit tests for any new or changed behavior
  • Outline any manual steps to test the PR here.

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

@Reamer Reamer left a comment

Copy link
Copy Markdown
Contributor

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

@ParkGyeongTae ParkGyeongTae left a comment

Copy link
Copy Markdown
Member

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 e9608f7 into apache:master Jul 17, 2025
27 of 47 checks passed
asf-gitbox-commits pushed a commit that referenced this pull request Jul 17, 2025
### What is this PR for?

In the following file [zeppelin/file/src/main/java/org/apache/zeppelin/file/HDFSFileInterpreter.java](https://github.com/apache/zeppelin/blob/91f091e287b94295ec7f10254b4f4ac800209899/file/src/main/java/org/apache/zeppelin/file/HDFSFileInterpreter.java#L180)

The Character constructor is deprecated in Java 9 and later, recommending the use of the static factory method Character.valueOf() instead.

This change's objective is to update the code to use the modern recommended approach.

As-is
```
 if (args.flags.contains(new Character('l'))) {
```
To-be
```
if (args.flags.contains(Character.valueOf('l'))) {
```

Also, Changed single word's type from **""** -> **''**


### What type of PR is it?
Refactoring

### Todos
* [ ] - Replace deprecated Character constructor
* [ ] - Change single word's data type 

### What is the Jira issue?
* Open an issue on [Jira](https://issues.apache.org/jira/browse/ZEPPELIN-6246)

### How should this be tested?
* Strongly recommended: add automated unit tests for any new or changed behavior
* Outline any manual steps to test the PR here.

### 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 #4979 from hyunw9/ZEPPELIN-6246.

Signed-off-by: Philipp Dallig <philipp.dallig@gmail.com>
@Reamer

Reamer commented Jul 17, 2025

Copy link
Copy Markdown
Contributor

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