junit 5: build from source leads to exception

186 Views Asked by At

I'm trying to build junit 5 from source via gradle (OS X, el kapitan) checked out: git clone https://github.com/junit-team/junit5.git

running command to build: gradlew clean assemble (or install)

in both cases i get:

junit5/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/MethodArgumentsProvider.java:41: error: unreported exception X; must be caught or declared to be thrown
                                    .orElseThrow(() -> new JUnitException("Could not find method: " + methodName)))
                                                ^
  where X,T are type-variables:
X extends Throwable declared in method <X>orElseThrow(Supplier<? extends X>)
T extends Object declared in class Optional

any hints? thx in advance

1

There are 1 best solutions below

0
On BEST ANSWER

This is a result of a JDK bug that was corrected in a release at some point after 1.8_40. Try upgrading your JDK to the latest version.

Ref: https://bugs.openjdk.java.net/browse/JDK-8054569 Ref: Java8 Lambdas and Exceptions