--- old/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/Functional.java 2019-12-13 13:34:52.702008200 -0500 +++ new/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/Functional.java 2019-12-13 13:34:51.658963600 -0500 @@ -23,10 +23,7 @@ package jdk.jpackage.test; import java.lang.reflect.InvocationTargetException; -import java.util.function.Consumer; -import java.util.function.Function; -import java.util.function.Predicate; -import java.util.function.Supplier; +import java.util.function.*; public class Functional { @@ -46,6 +43,21 @@ } @FunctionalInterface + public interface ThrowingBiConsumer { + void accept(T t, U u) throws Throwable; + + public static BiConsumer toBiConsumer(ThrowingBiConsumer v) { + return (t, u) -> { + try { + v.accept(t, u); + } catch (Throwable ex) { + rethrowUnchecked(ex); + } + }; + } + } + + @FunctionalInterface public interface ThrowingSupplier { T get() throws Throwable; @@ -102,6 +114,10 @@ return v; } + public static BiConsumer identity(BiConsumer v) { + return v; + } + public static Runnable identity(Runnable v) { return v; }