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

[Java] OrcReader#close doesn't throw any checked exceptions #37864

Closed
lidavidm opened this issue Sep 25, 2023 · 1 comment · Fixed by #37913
Closed

[Java] OrcReader#close doesn't throw any checked exceptions #37864

lidavidm opened this issue Sep 25, 2023 · 1 comment · Fixed by #37913

Comments

@lidavidm
Copy link
Member

Describe the enhancement requested

@Override
public void close() throws Exception {
jniWrapper.close(nativeInstanceId);
}

No checked exception is actually thrown here. For people using the class directly, it clutters their code to have to handle such a generic exception (and it might overlap with/suppress things like IDEs filling in handlers for other checked exceptions that may actually happen), so it would be nice to just remove the throws clause.

Component(s)

Java

@jduo
Copy link
Member

jduo commented Sep 26, 2023

take

jduo added a commit to jduo/arrow that referenced this issue Sep 27, 2023
Remove an unnecessary throws specifier on OrcReader#close()
to make it more friendly to use.
lidavidm pushed a commit that referenced this issue Sep 28, 2023
### Rationale for this change
Make OrcReader more friendly to use with try-with-resources blocks and AutoCloseables by
removing an unnecessary throws modifier on close().

### What changes are included in this PR?
Removes an unused throws specifier on OrcReader#close().

### Are these changes tested?
Yes.

### Are there any user-facing changes?
No.
* Closes: #37864

Authored-by: James Duong <duong.james@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
@lidavidm lidavidm added this to the 14.0.0 milestone Sep 28, 2023
etseidl pushed a commit to etseidl/arrow that referenced this issue Sep 28, 2023
…he#37913)

### Rationale for this change
Make OrcReader more friendly to use with try-with-resources blocks and AutoCloseables by
removing an unnecessary throws modifier on close().

### What changes are included in this PR?
Removes an unused throws specifier on OrcReader#close().

### Are these changes tested?
Yes.

### Are there any user-facing changes?
No.
* Closes: apache#37864

Authored-by: James Duong <duong.james@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
JerAguilon pushed a commit to JerAguilon/arrow that referenced this issue Oct 23, 2023
…he#37913)

### Rationale for this change
Make OrcReader more friendly to use with try-with-resources blocks and AutoCloseables by
removing an unnecessary throws modifier on close().

### What changes are included in this PR?
Removes an unused throws specifier on OrcReader#close().

### Are these changes tested?
Yes.

### Are there any user-facing changes?
No.
* Closes: apache#37864

Authored-by: James Duong <duong.james@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
JerAguilon pushed a commit to JerAguilon/arrow that referenced this issue Oct 23, 2023
…he#37913)

### Rationale for this change
Make OrcReader more friendly to use with try-with-resources blocks and AutoCloseables by
removing an unnecessary throws modifier on close().

### What changes are included in this PR?
Removes an unused throws specifier on OrcReader#close().

### Are these changes tested?
Yes.

### Are there any user-facing changes?
No.
* Closes: apache#37864

Authored-by: James Duong <duong.james@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
loicalleyne pushed a commit to loicalleyne/arrow that referenced this issue Nov 13, 2023
…he#37913)

### Rationale for this change
Make OrcReader more friendly to use with try-with-resources blocks and AutoCloseables by
removing an unnecessary throws modifier on close().

### What changes are included in this PR?
Removes an unused throws specifier on OrcReader#close().

### Are these changes tested?
Yes.

### Are there any user-facing changes?
No.
* Closes: apache#37864

Authored-by: James Duong <duong.james@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
dgreiss pushed a commit to dgreiss/arrow that referenced this issue Feb 19, 2024
…he#37913)

### Rationale for this change
Make OrcReader more friendly to use with try-with-resources blocks and AutoCloseables by
removing an unnecessary throws modifier on close().

### What changes are included in this PR?
Removes an unused throws specifier on OrcReader#close().

### Are these changes tested?
Yes.

### Are there any user-facing changes?
No.
* Closes: apache#37864

Authored-by: James Duong <duong.james@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants