Skip to content

Remove useless com.ibm.j9ddr.corereaders.ShutdownHook - #14400

Merged
pshipton merged 1 commit into
eclipse-openj9:masterfrom
keithc-ca:shutdownhook
Jan 31, 2022
Merged

Remove useless com.ibm.j9ddr.corereaders.ShutdownHook#14400
pshipton merged 1 commit into
eclipse-openj9:masterfrom
keithc-ca:shutdownhook

Conversation

@keithc-ca

Copy link
Copy Markdown
Contributor

ShutdownHook collected weak references to streams that should eventually be closed, but its run() method was never called (not even indirectly via passing to Runtime.addShutdownHook()) so the list of references was never read.

Also:

  • improve AbstractCoreReader.getString() via ByteArrayOutputStream and StandardCharsets
  • remove unused constructor ClosingFileReader(File, boolean)

Noticed while investigating #14193.

It collected weak references to streams that should eventually
be closed, but it was never treated as a Thread and passed
to Runtime.addShutdownHook() so the the list of references was
never read.

Also remove unused constructor ClosingFileReader(File, boolean).

Signed-off-by: Keith W. Campbell <keithc@ca.ibm.com>
@keithc-ca
keithc-ca requested a review from pshipton January 31, 2022 17:28
@pshipton

Copy link
Copy Markdown
Member

jenkins test extended alinux64 jdk8

@pshipton
pshipton merged commit 0d09d58 into eclipse-openj9:master Jan 31, 2022
@keithc-ca
keithc-ca deleted the shutdownhook branch January 31, 2022 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants