Fixed most reported issues by SonarCloud.

This commit is contained in:
Toxic Dreamz
2020-08-15 21:47:39 +04:00
parent e7e3ace01f
commit 31471acb69
190 changed files with 1426 additions and 661 deletions

View File

@ -47,6 +47,7 @@ public class Promise<T> extends PromiseSupport<T> {
* Creates a promise that will be fulfilled in future.
*/
public Promise() {
// Empty constructor
}
/**

View File

@ -26,13 +26,15 @@ package com.iluwatar.promise;
import java.util.concurrent.ExecutionException;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
/**
* Application test.
*/
public class AppTest {
class AppTest {
@Test
public void testApp() throws InterruptedException, ExecutionException {
App.main(null);
void shouldExecuteApplicationWithoutException() {
assertDoesNotThrow(() -> App.main(null));
}
}

View File

@ -67,7 +67,7 @@ public class PromiseTest {
@Test
public void promiseIsFulfilledWithAnExceptionIfTaskThrowsAnException()
throws InterruptedException, TimeoutException {
throws InterruptedException {
testWaitingForeverForPromiseToBeFulfilled();
testWaitingSomeTimeForPromiseToBeFulfilled();
}