-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
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