Browse Source

Minor style/readability fixes

Signed-off-by: Pekka Helenius <fincer89@hotmail.com>
v0.0.3-alpha
Pekka Helenius 4 years ago
parent
commit
6dcb1abbc3
2 changed files with 8 additions and 3 deletions
  1. +5
    -2
      bookstore/src/main/java/com/fjordtek/bookstore/web/BookBasePathAwareController.java
  2. +3
    -1
      bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java

+ 5
- 2
bookstore/src/main/java/com/fjordtek/bookstore/web/BookBasePathAwareController.java View File

@ -69,8 +69,11 @@ public class BookBasePathAwareController {
private void bookGetAndSetNestedJSON(Book book, JsonNode bookNode) { private void bookGetAndSetNestedJSON(Book book, JsonNode bookNode) {
// Nested data: Determine nested JSON keys & their values // 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 // We keep going even if some of these are still null
try { authorFirstName = bookNode.get("author").get("firstname").textValue(); } catch (NullPointerException e) {}; try { authorFirstName = bookNode.get("author").get("firstname").textValue(); } catch (NullPointerException e) {};


+ 3
- 1
bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java View File

@ -87,6 +87,9 @@ public class BookController {
) { ) {
this.bookAuthorHelper = bookAuthorHelper; this.bookAuthorHelper = bookAuthorHelper;
} }
private HttpServerLogger httpServerLogger = new HttpServerLogger();
/* /*
private Map<String,String> globalModelMap = new HashMap<String,String>() { private Map<String,String> globalModelMap = new HashMap<String,String>() {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -95,7 +98,6 @@ public class BookController {
... ...
}}; }};
*/ */
private HttpServerLogger httpServerLogger = new HttpServerLogger();
@ModelAttribute @ModelAttribute
public void globalAttributes(Model dataModel) { public void globalAttributes(Model dataModel) {


Loading…
Cancel
Save