Skip to content
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

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

Closed
spring-projects-issues opened this issue Jan 29, 2009 · 2 comments
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

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

@spring-projects-issues
Copy link
Collaborator Author

Arjen Poutsma commented

Moved to SPR, since that's the new home of OXM.

@spring-projects-issues
Copy link
Collaborator Author

Arjen Poutsma commented

Fixed: there is now a setImplicitCollections (plural), which takes a Map of classes mapping to comma-separated field names. There was nothing wrong with your suggested solution, but this is simply more in line with the omittedFields property, which already used a similar format.

@spring-projects-issues spring-projects-issues added in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.0 M3 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants