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

@ -57,12 +57,14 @@ public class App {
var pool = new OliphauntPool();
LOGGER.info(pool.toString());
var oliphaunt1 = pool.checkOut();
LOGGER.info("Checked out {}", oliphaunt1);
String checkedOut = "Checked out {}";
LOGGER.info(checkedOut, oliphaunt1);
LOGGER.info(pool.toString());
var oliphaunt2 = pool.checkOut();
LOGGER.info("Checked out {}", oliphaunt2);
LOGGER.info(checkedOut, oliphaunt2);
var oliphaunt3 = pool.checkOut();
LOGGER.info("Checked out {}", oliphaunt3);
LOGGER.info(checkedOut, oliphaunt3);
LOGGER.info(pool.toString());
LOGGER.info("Checking in {}", oliphaunt1);
pool.checkIn(oliphaunt1);
@ -70,9 +72,9 @@ public class App {
pool.checkIn(oliphaunt2);
LOGGER.info(pool.toString());
var oliphaunt4 = pool.checkOut();
LOGGER.info("Checked out {}", oliphaunt4);
LOGGER.info(checkedOut, oliphaunt4);
var oliphaunt5 = pool.checkOut();
LOGGER.info("Checked out {}", oliphaunt5);
LOGGER.info(checkedOut, oliphaunt5);
LOGGER.info(pool.toString());
}
}

View File

@ -30,11 +30,10 @@ import org.junit.jupiter.api.Test;
* Application test
*
*/
public class AppTest {
class AppTest {
@Test
public void test() {
String[] args = {};
App.main(args);
void shouldExecuteApplicationWithoutException() {
App.main(new String[]{});
}
}