From 6dcb1abbc3ce4b332692a2fb4dd5e6b52d11126d Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Wed, 7 Oct 2020 11:22:21 +0300 Subject: [PATCH] Minor style/readability fixes Signed-off-by: Pekka Helenius --- .../bookstore/web/BookBasePathAwareController.java | 7 +++++-- .../java/com/fjordtek/bookstore/web/BookController.java | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/web/BookBasePathAwareController.java b/bookstore/src/main/java/com/fjordtek/bookstore/web/BookBasePathAwareController.java index 51a3334..fbb5fd3 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/web/BookBasePathAwareController.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/web/BookBasePathAwareController.java @@ -69,8 +69,11 @@ public class BookBasePathAwareController { private void bookGetAndSetNestedJSON(Book book, JsonNode bookNode) { // Nested data: Determine nested JSON keys & their values - String authorFirstName = null, authorLastName = null; - String categoryName = null; + String + authorFirstName = null, + authorLastName = null, + categoryName = null + ; // We keep going even if some of these are still null try { authorFirstName = bookNode.get("author").get("firstname").textValue(); } catch (NullPointerException e) {}; diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java b/bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java index 20fb064..5f36969 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java @@ -87,6 +87,9 @@ public class BookController { ) { this.bookAuthorHelper = bookAuthorHelper; } + + private HttpServerLogger httpServerLogger = new HttpServerLogger(); + /* private Map globalModelMap = new HashMap() { private static final long serialVersionUID = 1L; @@ -95,7 +98,6 @@ public class BookController { ... }}; */ - private HttpServerLogger httpServerLogger = new HttpServerLogger(); @ModelAttribute public void globalAttributes(Model dataModel) {