Skip to content

Commit

Permalink
Apply auto-formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
safris committed Sep 26, 2023
1 parent 5b70998 commit 135377a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
8 changes: 4 additions & 4 deletions src/main/java/org/libj/test/AssertXml.java
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ public void assertEqual(final String message) {
* Assert equality of the {@code control} and {@code test} elements in this {@link AssertXml} instance. If they are not, a
* {@link ComparisonFailure} without a message is thrown.
*
* @param filterStacktrace If {@code true}, a {@link ComparisonFailure} will have its "test framework internal" stack trace
* elements removed, making the top stack trace element the test entrypoint.
* @param filterStacktrace If {@code true}, a {@link ComparisonFailure} will have its "test framework internal" stack trace elements
* removed, making the top stack trace element the test entrypoint.
* @throws ComparisonFailure If the {@code control} and {@code test} elements in this {@link AssertXml} instance are not equal.
*/
public void assertEqual(final boolean filterStacktrace) {
Expand All @@ -295,8 +295,8 @@ public void assertEqual(final boolean filterStacktrace) {
* {@link ComparisonFailure} is thrown with the given message.
*
* @param message The identifying message for the {@link ComparisonFailure} (null is okay).
* @param filterStacktrace If {@code true}, a {@link ComparisonFailure} will have its "test framework internal" stack trace
* elements removed, making the top stack trace element the test entrypoint.
* @param filterStacktrace If {@code true}, a {@link ComparisonFailure} will have its "test framework internal" stack trace elements
* removed, making the top stack trace element the test entrypoint.
* @throws ComparisonFailure If the {@code control} and {@code test} elements in this {@link AssertXml} instance are not equal.
*/
public void assertEqual(final String message, final boolean filterStacktrace) {
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/org/libj/test/TestAide.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public static boolean isInSurefireTest() {
* Returns {@code true} if the current runtime is executed in a Continuous Integration Environment of Travis CI, Circle CI, or
* GitHub Actions.
*
* @return {@code true} if the current runtime is executed in a Continuous Integration Environment of Travis CI, Circle CI or
* GitHub Actions, otherwise {@code false}.
* @return {@code true} if the current runtime is executed in a Continuous Integration Environment of Travis CI, Circle CI or GitHub
* Actions, otherwise {@code false}.
*/
public static boolean isInCiTest() {
if (inCiTestInited)
Expand Down Expand Up @@ -119,12 +119,14 @@ public static void printRuntimeParameters(final PrintStream ps) {
final int i$ = arguments.size();
if (i$ > 0) {
if (arguments instanceof RandomAccess) {
int i = 0; do // [RA]
int i = 0;
do // [RA]
ps.println(arguments.get(i));
while (++i < i$);
}
else {
final Iterator<String> i = arguments.iterator(); do // [I]
final Iterator<String> i = arguments.iterator();
do // [I]
ps.println(i.next());
while (i.hasNext());
}
Expand Down
13 changes: 7 additions & 6 deletions src/main/java/org/libj/test/TestExecutorService.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public void uncaughtException(final Thread t, final Throwable e) {

/**
* Creates a new {@link TestExecutorService} with the provided target {@link ExecutorService}.
*
* @param target The target {@link ExecutorService}.
* @throws NullPointerException If {@code target} is null.
*/
Expand Down Expand Up @@ -86,15 +87,15 @@ public boolean isTerminated() {
}

@Override
public <T>Future<T> submit(final Callable<T> task) {
public <T> Future<T> submit(final Callable<T> task) {
return target.submit(() -> {
threads.add(Thread.currentThread());
return task.call();
});
}

@Override
public <T>Future<T> submit(final Runnable task, final T result) {
public <T> Future<T> submit(final Runnable task, final T result) {
return target.submit(() -> {
threads.add(Thread.currentThread());
task.run();
Expand All @@ -110,7 +111,7 @@ public Future<?> submit(final Runnable task) {
}

@Override
public <T>List<Future<T>> invokeAll(final Collection<? extends Callable<T>> tasks) throws InterruptedException {
public <T> List<Future<T>> invokeAll(final Collection<? extends Callable<T>> tasks) throws InterruptedException {
final ArrayList<Callable<T>> callables = new ArrayList<>(tasks);
for (int i = 0, i$ = callables.size(); i < i$; ++i) { // [RA]
final Callable<T> task = callables.get(i);
Expand All @@ -127,7 +128,7 @@ public T call() throws Exception {
}

@Override
public <T>List<Future<T>> invokeAll(final Collection<? extends Callable<T>> tasks, final long timeout, final TimeUnit unit) throws InterruptedException {
public <T> List<Future<T>> invokeAll(final Collection<? extends Callable<T>> tasks, final long timeout, final TimeUnit unit) throws InterruptedException {
final ArrayList<Callable<T>> callables = new ArrayList<>(tasks);
for (int i = 0, i$ = callables.size(); i < i$; ++i) { // [RA]
final Callable<T> task = callables.get(i);
Expand All @@ -144,7 +145,7 @@ public T call() throws Exception {
}

@Override
public <T>T invokeAny(final Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException {
public <T> T invokeAny(final Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException {
final ArrayList<Callable<T>> callables = new ArrayList<>(tasks);
for (int i = 0, i$ = callables.size(); i < i$; ++i) { // [RA]
final Callable<T> task = callables.get(i);
Expand All @@ -161,7 +162,7 @@ public T call() throws Exception {
}

@Override
public <T>T invokeAny(final Collection<? extends Callable<T>> tasks, final long timeout, final TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
public <T> T invokeAny(final Collection<? extends Callable<T>> tasks, final long timeout, final TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
final ArrayList<Callable<T>> callables = new ArrayList<>(tasks);
for (int i = 0, i$ = callables.size(); i < i$; ++i) { // [RA]
final Callable<T> task = callables.get(i);
Expand Down

0 comments on commit 135377a

Please sign in to comment.