Skip to content

Commit b85bce4

Browse files
committed
Backport #496 fix for 2.3.4
1 parent e4e0ed8 commit b85bce4

File tree

3 files changed

+8
-319
lines changed

3 files changed

+8
-319
lines changed

release-notes/VERSION

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
Project: jackson-databind
2-
Version: 2.3.4 (xx-xxx-2014)
2+
Version: 2.3.5 (xx-xxx-2014)
33

44
#543: Problems resolve self-referential generic types.
5+
#496: Wrong result for TextNode("false").asBoolean(true)
6+
(reported by Ivar R, ivarru@github)
57

68
------------------------------------------------------------------------
79
=== History: ===

src/main/java/com/fasterxml/jackson/databind/DeserializationFeature.java.orig

Lines changed: 0 additions & 317 deletions
This file was deleted.

src/main/java/com/fasterxml/jackson/databind/node/TextNode.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,13 @@ public String asText() {
178178
@Override
179179
public boolean asBoolean(boolean defaultValue) {
180180
if (_value != null) {
181-
if ("true".equals(_value.trim())) {
181+
String v = _value.trim();
182+
if ("true".equals(v)) {
182183
return true;
183184
}
185+
if ("false".equals(v)) {
186+
return false;
187+
}
184188
}
185189
return defaultValue;
186190
}

0 commit comments

Comments
 (0)