Skip to content

XStreamMarshaller.setImplicitCollection(Map) is insufficient [SPR-5449] #10086

@spring-projects-issues

Description

@spring-projects-issues

Jörg Gottschling opened SPR-5449 and commented

The Method Signature as proposed in SWS-361 is insufficient. It it really buggy. Because it is a Map (that has unique keys), you can not add two collections with the same name, even if thy are part of different classes:

<property name="implicitCollection">
<map>
<entry key="theCollection" value="package.TheClass" />
<entry key="theCollection" value="package.OtherClass" />
</map>
</property>

If configured so, only "theCollection" in "OtherClass" will be implicit, because it "overrides" "theCollection" from "TheClass".

I like to propose to deprecate the method and add on with a slightly different signature. It should take a Collection of Strings with the fully qualified name of the Collection. XStreamMarshaller.setImplicitCollections(Collection<String>)

<property name="implicitCollections">
<set>
<value>package.TheClass.theCollection</value>
<value>package.OtherClass.theCollection</value>
</set>
</property>
By the way: Shouldn't it be "implicitCollections" (plural?).


Referenced from: commits 03f3bf0

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions