Closed GoogleCodeExporter closed 9 years ago
This is a rather complex issue. It is related to the problem that standard YAML
tags
have more then one Java implementation.
In general the runtime class is defined in the following order:
Explicit tag (!!int) -> runtime class (java.lang.Long)-> implicit tag (!!int)
As you can see when you use ScalarStyle.DOUBLE_QUOTED the explicit tag forces
an
Integer to be created and it breaks the test.
I will think how I can improve the situation. Meanwhile I have implemented a
change
in the Representer to allow custom tags for standard Java classes.
Check the latest source. Look here LongTest.testLongRepresenter()
(http://code.google.com/p/snakeyaml/source/browse/src/test/java/org/yaml/snakeya
ml/ja
vabeans/LongTest.java)
Please let me know whether it is enough for you.
Original comment by py4fun@gmail.com
on 3 Sep 2009 at 2:40
I've simply disabled DumperOptions.ScalarStyle.DOUBLE_QUOTED for now (only
activated it before because it sounded like a Good Idea (TM)), which solved the
problem for me.
Original comment by creini...@googlemail.com
on 3 Sep 2009 at 2:48
Original comment by py4fun@gmail.com
on 4 Sep 2009 at 7:15
Original issue reported on code.google.com by
creini...@googlemail.com
on 3 Sep 2009 at 11:05