MCPcopy Create free account
hub / github.com/xmlet/HtmlFlow / asUncheckedRunnable

Method asUncheckedRunnable

flowifier/src/test/java/htmlflow/test/Utils.java:80–88  ·  view source on GitHub ↗

Convert a Closeable to a Runnable by converting checked IOException to UncheckedIOException

(Closeable c)

Source from the content-addressed store, hash-verified

78 * to UncheckedIOException
79 */
80 private static Runnable asUncheckedRunnable(Closeable c) {
81 return () -> {
82 try {
83 c.close();
84 } catch (IOException e) {
85 throw new UncheckedIOException(e);
86 }
87 };
88 }
89
90}

Callers 1

loadLinesMethod · 0.95

Calls 1

closeMethod · 0.80

Tested by

no test coverage detected