History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XSTR-243
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Assignee: Unassigned
Reporter: Simon Lei
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XStream

Transient field is unmarshaled from an marshaled xml

Created: 19/Sep/05 09:28 AM   Updated: 24/May/07 12:38 AM
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2.2


 Description  « Hide
A field is not transient when marshaled, then it
is changed to transient, and the unmarshaled
action will unserialize the field.

For example:

public class TryXstream {
    private String tmpFiled = "just a string";
}

It is marshaled into
<org.simon.payment.TryXstream>
  <tmpFiled>just a string</tmpFiled>
</org.simon.payment.TryXstream>

and change the field to transient


public class TryXstream {
    private transient String tmpFiled = "another string";
}

then unmarshal from the xml, the tmpField will be set to "just a string"



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Joerg Schaible - 15/Feb/06 03:27 PM
XStream will ignore transient field now completely.

Joerg Schaible - 10/Mar/07 12:17 PM
The fix introduced the behaviour that XStream throws a ConversionException instead of silently unmarshal the transient field. This new bahaviour is in contradition with the XStream documentation, that states that an XML element for such a field is simply ignored. Therefore the issue was reopened.

Joerg Schaible - 10/Mar/07 12:21 PM
XML elements for transient fields are now really ignored - not unserialized as it was done originally nor an exception is thrown. XStream behaves now in accordance with its FAQ.

Rene Schwietzke - 11/Mar/07 12:35 PM
Validated bug fix for " XML elements for transient fields are now really ignored according to FAQ" with an own test case. Bug is resolved for me.