The following test case passes when run against XStream 1.4.4, as expected:
But it fails in 1.4.5 and later (including 1.4.7): remove returns false against contract. In a debugger,
When the bug occurs, m is 17=17 rather than 17=PRESENT. Presumably this is due to this code in TreeSetConverter:
1.4.4 has the same, but sortedMapField is null (because !JVM.hasOptimizedTreeSetAddAll()) so this code is not used.
I am marking this as a high priority despite the possibility of workarounds once the bug is known, because there is no visible error during deserialization, yet the faulty collection then appears deep inside program logic and can lead to subtle bugs. (And in a large project using XStream extensively it is impossible to know who all might be using TreeSet.) I presume the only workaround is to replace TreeSetConverter with a working version.