Skip to content
This repository was archived by the owner on Jan 22, 2019. It is now read-only.
This repository was archived by the owner on Jan 22, 2019. It is now read-only.

Jackson does not ignore whitespace in XML element #67

@shevek

Description

@shevek

To reproduce:
git clone [email protected]:shevek/bugs-tests-and-examples.git
git checkout jackson-xml-whitespace
./gradlew installDist && ./build/install/bugs-tests-and-examples/bin/bugs-tests-and-examples

Actual behaviour:

Exception in thread "main" com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "" (class org.anarres.tests.Datasource$Column), not marked as ignorable (2 known properties: "members", "role"])
 at [Source: java.io.BufferedInputStream@2c039ac6; line: 6, column: 40] (through reference chain: org.anarres.tests.Workbook["datasources"]->java.util.ArrayList[0]->org.anarres.tests.Datasource["column"]->java.util.ArrayList[0]->org.anarres.tests.Datasource$Column[""])

Variants of expected behaviour:
When tweaking the XML file a bit:

Can not deserialize instance of java.util.ArrayList out of VALUE_STRING token

Expected behaviour:
Ignores whitespace in empty list element and does not attempt to synthesize a value out of it.

Related issues:

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions