Skip to content

Commit

Permalink
Merge 8f0ee47 into 46acdde
Browse files Browse the repository at this point in the history
  • Loading branch information
XenoAmess committed Jun 18, 2020
2 parents 46acdde + 8f0ee47 commit 3211c9a
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 7 deletions.
Expand Up @@ -38,4 +38,4 @@ public interface FailableFunction<I, R, T extends Throwable> {
* @throws T Thrown when the function fails.
*/
R apply(I input) throws T;
}
}
Expand Up @@ -37,4 +37,4 @@ public interface FailablePredicate<I, T extends Throwable> {
* @throws T if the predicate fails
*/
boolean test(I object) throws T;
}
}
Expand Up @@ -32,4 +32,4 @@ public interface FailableRunnable<T extends Throwable> {
* @throws T Thrown when the function fails.
*/
void run() throws T;
}
}
Expand Up @@ -36,4 +36,4 @@ public interface FailableSupplier<R, T extends Throwable> {
* @throws T if the supplier fails
*/
R get() throws T;
}
}
23 changes: 23 additions & 0 deletions src/main/java/org/apache/commons/lang3/function/package-info.java
@@ -0,0 +1,23 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* <p>Provides utility functions, and classes as additions to the</p>
* <p>{@code java.util.function} package.</p>
*
* @since 3.11
*/
package org.apache.commons.lang3.function;
23 changes: 23 additions & 0 deletions src/main/java/org/apache/commons/lang3/stream/package-info.java
@@ -0,0 +1,23 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* <p>Provides utility functions, and classes for working with the</p>
* <p>{@code java.util.stream} package, or more generally, with Java 8 lambdas.</p>
*
* @since 3.11
*/
package org.apache.commons.lang3.stream;
Expand Up @@ -20,7 +20,6 @@

import java.util.function.LongConsumer;

import org.apache.commons.lang3.concurrent.Locks;
import org.apache.commons.lang3.concurrent.Locks.Lock;
import org.apache.commons.lang3.function.FailableConsumer;
import org.junit.jupiter.api.Test;
Expand Down
Expand Up @@ -889,8 +889,8 @@ public void testIntPredicate() throws Throwable {
public void testLongPredicate() throws Throwable {
FailureOnOddInvocations.invocations = 0;
final FailableLongPredicate<Throwable> failablePredicate = t1 -> FailureOnOddInvocations.testLong(t1);
assertThrows(SomeException.class, () -> failablePredicate.test(1l));
failablePredicate.test(1l);
assertThrows(SomeException.class, () -> failablePredicate.test(1L));
failablePredicate.test(1L);
}

@Test
Expand Down

0 comments on commit 3211c9a

Please sign in to comment.