From 6c963e1b6cc9fa165ba6e88c2de22afc47204d71 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Thu, 4 Jan 2024 23:04:15 +0000 Subject: [PATCH] format --- .../controller/web/HomeWebController.java | 25 ++++++++++--------- .../software/SPDF/model/Dependency.java | 1 - 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/java/stirling/software/SPDF/controller/web/HomeWebController.java b/src/main/java/stirling/software/SPDF/controller/web/HomeWebController.java index 82c3b4bf..2426d523 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/HomeWebController.java +++ b/src/main/java/stirling/software/SPDF/controller/web/HomeWebController.java @@ -1,26 +1,27 @@ package stirling.software.SPDF.controller.web; +import java.io.IOException; +import java.nio.file.Files; +import java.util.List; +import java.util.Map; + import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; +import org.springframework.core.io.Resource; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ResponseBody; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + import io.swagger.v3.oas.annotations.Hidden; import stirling.software.SPDF.model.ApplicationProperties; import stirling.software.SPDF.model.Dependency; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.springframework.core.io.ClassPathResource; -import org.springframework.core.io.Resource; -import java.io.IOException; -import java.nio.file.Files; -import java.util.List; -import java.util.Map; - @Controller public class HomeWebController { @@ -30,7 +31,7 @@ public class HomeWebController { model.addAttribute("currentPage", "about"); return "about"; } - + @GetMapping("/licenses") @Hidden public String licensesForm(Model model) { @@ -39,14 +40,14 @@ public class HomeWebController { try { String json = new String(Files.readAllBytes(resource.getFile().toPath())); ObjectMapper mapper = new ObjectMapper(); - Map> data = mapper.readValue(json, new TypeReference>>() {}); + Map> data = + mapper.readValue(json, new TypeReference>>() {}); model.addAttribute("dependencies", data.get("dependencies")); } catch (IOException e) { e.printStackTrace(); } return "licenses"; } - @GetMapping("/") public String home(Model model) { diff --git a/src/main/java/stirling/software/SPDF/model/Dependency.java b/src/main/java/stirling/software/SPDF/model/Dependency.java index bbff3e2a..008a6f52 100644 --- a/src/main/java/stirling/software/SPDF/model/Dependency.java +++ b/src/main/java/stirling/software/SPDF/model/Dependency.java @@ -9,5 +9,4 @@ public class Dependency { private String moduleVersion; private String moduleLicense; private String moduleLicenseUrl; - }