From f8d54f50df729c93a6d99b7606f07701eaa8c239 Mon Sep 17 00:00:00 2001 From: Tom Mulcahy Date: Mon, 11 May 2020 12:26:59 -0700 Subject: [PATCH] Fix ClosedChannelException Summary: I attempted to fix the ClosedByInterruptException in D21438754, but because I didn't move the file constructor into the loop, it just converted it into ChannelClosedException Reviewed By: tophyr Differential Revision: D21506323 fbshipit-source-id: 16134c11ff3e354b333badffcf22e73ddb0a9303 --- java/com/facebook/soloader/MinElf.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/com/facebook/soloader/MinElf.java b/java/com/facebook/soloader/MinElf.java index 560428c..237bcad 100644 --- a/java/com/facebook/soloader/MinElf.java +++ b/java/com/facebook/soloader/MinElf.java @@ -68,8 +68,8 @@ public String toString() { public static final int PN_XNUM = 0xFFFF; public static String[] extract_DT_NEEDED(File elfFile) throws IOException { - FileInputStream is = new FileInputStream(elfFile); while (true) { + FileInputStream is = new FileInputStream(elfFile); try { return extract_DT_NEEDED(is.getChannel()); } catch (ClosedByInterruptException e) {