-
-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange behaviour of an empty item (but with whitespace between start/end tags) in List #191
Comments
Looks like a bug. I suspect this is because entry with |
@cowtowncoder Maybe some kind of flag that can give different behaviours, Is there any flag to achieve behaviour like in |
@Hronom this is not intentional, so I don't think there is any need to support existing behavior. Problem is more with figuring out to fix the problem. Did this behave differently with 2.6.3? |
@cowtowncoder Yes when I change dependencies to <!-- Jackson -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.6.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.6.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.6.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>2.6.3</version>
</dependency> All works as expected. |
@Hronom thank you for additional information. This must then be a regression due to fixes included in 2.7; handling of empty Strings is a tricky problem. |
One thing on test: it's usually a good idea NOT to disable "fail on unknown properties". Enabling it often masks legitimate failures. Not a big deal here, just thought I'll mention it. |
@cowtowncoder thanks for your advice, I think I enable it on real project. |
@Hronom right, there are cases where it's useful to disable it, but you can also just disable it for specific types with I can reproduce this issue now with 2.7.3. Thanks! |
Guessing this might be due fix for #177, which would also affect 2.6.5. |
Strange behaviour of empty item in list (v2.7.3)
So I have next xml file
TestList.xml
:But when I deserializing this file, I lost all items after item with name
Item2
, so items:Item3
,Item4
,Item5
is lost. If I change this xml file to next format:All start working as expected.
In version
2.6.3
all work as expected...Code listing
pom.xml
App.java
TestList.java
ListItem.java
The text was updated successfully, but these errors were encountered: