On 06/02/2014 06:36 AM, Martin Buchholz wrote:
Thanks!  Looks good.
There might be more common infrastructure to take advantage of later.
@FunctionalInterface is not really in the spirit of my super-compact
stylistically odd test code, but OK.

Another question is why not to use a functional interface with one parameter (Fun2?)
or keep Fun and introduce Fun2.
  //interface Fun {void f() throws Throwable;}
  interface Fun2<T> {void f(T value) throws Throwable;}
THROWS(BrokenBarrierException.class, barrier, x ->x.await(100, MILISECOND));
  THROWS(IllegalStateException.class, it, Iterator::remove);

with the nice advantage that most of the time the lambda will be constant
(a lambda that's not capture value from the outer context).

Rémi





On Sun, Jun 1, 2014 at 5:57 PM, Ivan Gerasimov <[email protected]>
wrote:

Hello!

Would you please help review the fix, which replaces the auxiliary Fun
class with the same named functional interface?
The anonymous classes instantiations are replaced with lambdas.

BUGURL: https://bugs.openjdk.java.net/browse/JDK-8037866
WEBREV: http://cr.openjdk.java.net/~igerasim/8037866/0/webrev/

Sincerely yours,
Ivan


Reply via email to