From f341af566518055937437e64bfe57a623ddc0a8b Mon Sep 17 00:00:00 2001 From: joshua bauer Date: Sun, 29 Dec 2019 21:48:32 -0800 Subject: [PATCH] Improve default JsonView handling. --- CHANGELOG.md | 10 ++++++++++ .../io/sinistral/proteus/wrappers/JsonViewWrapper.java | 6 ++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5546aa6..482cd20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ Proteus Changelog. ## Unreleased ### No issue +**Restructure pom files.** + + +[f19edfc200c612a](https://github.com/noboomu/proteus/commit/f19edfc200c612a) Joshua Bauer *2020-12-30 01:17:28* + +**Update README.md** + + +[af53f9619d7afbc](https://github.com/noboomu/proteus/commit/af53f9619d7afbc) JL Bauer *2019-12-28 07:27:28* + **Next snapshot.** diff --git a/proteus-core/src/main/java/io/sinistral/proteus/wrappers/JsonViewWrapper.java b/proteus-core/src/main/java/io/sinistral/proteus/wrappers/JsonViewWrapper.java index 8c3346c..2998196 100644 --- a/proteus-core/src/main/java/io/sinistral/proteus/wrappers/JsonViewWrapper.java +++ b/proteus-core/src/main/java/io/sinistral/proteus/wrappers/JsonViewWrapper.java @@ -70,9 +70,11 @@ public HttpHandler wrap(HttpHandler handler) .orElse(DEFAULT_VIEW_CLASS); - Class viewClass = CLASS_MAP.get(className); + if(className != null) { + Class viewClass = CLASS_MAP.get(className.toLowerCase()); - exchange.putAttachment(JSON_VIEW_KEY, viewClass); + exchange.putAttachment(JSON_VIEW_KEY, viewClass); + } }