Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mourjo committed Dec 3, 2023
1 parent 6ac3704 commit 69cd602
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
8 changes: 3 additions & 5 deletions src/main/java/me/mourjo/jamboree/JamboreeApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import java.util.concurrent.Executors;

@SpringBootApplication
public class JamboreeApplication {

private static Logger log = LoggerFactory.getLogger(JamboreeApplication.class);
private static final Logger logger = LoggerFactory.getLogger(JamboreeApplication.class);

public static void main(String[] args) {
log.info("Starting application");
logger.info("Starting application");
SpringApplication.run(JamboreeApplication.class, args);
log.info("Started application");
logger.info("Started application");
}

@Bean
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/mourjo/jamboree/data/Response.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

public class Response extends ResponseEntity<Map<String, String>> {

private static Logger logger = LoggerFactory.getLogger(Response.class);
private static final Logger logger = LoggerFactory.getLogger(Response.class);

public Response(Map<String, String> body, HttpStatusCode status) {
super(body, status);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/mourjo/jamboree/rest/PartyController.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
public class PartyController {

private final PartyService service;
private Logger logger = LoggerFactory.getLogger(getClass().getName());
private final Logger logger = LoggerFactory.getLogger(getClass().getName());

PartyController(PartyService service) {
this.service = service;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/me/mourjo/jamboree/service/PartyService.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
public class PartyService {
private final PartyRepository repository;
private final IDGenerator idGenerator;
private Logger logger = LoggerFactory.getLogger(getClass().getName());
private final Logger logger = LoggerFactory.getLogger(getClass().getName());

PartyService(PartyRepository repository, IDGenerator idGenerator) {
this.repository = repository;
Expand All @@ -38,7 +38,7 @@ public Party add(String name, String location, ZonedDateTime ts) {

public Optional<Party> find(long id) {
var party = repository.findById(id);
if (party.isEmpty()){
if (party.isEmpty()) {
logger.warn("Requested party does not exist: {}", id);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import java.util.Set;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;


@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.time.ZoneId;
import java.time.ZonedDateTime;

import static org.junit.jupiter.api.Assertions.*;
import static org.junit.jupiter.api.Assertions.assertEquals;

class DatetimeDatetimeFormatTest {
@Test
Expand Down

0 comments on commit 69cd602

Please sign in to comment.