Fixed most reported issues by SonarCloud.
This commit is contained in:
@ -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());
|
||||
}
|
||||
}
|
||||
|
@ -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[]{});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user