question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SingleValueConverter registered globally does not get applied to XStream

See original GitHub issue

Because Converter and SingleValueConverter are not type-compatible, and the change that added support for globally registering custom Converters does not handle SingleValueConverters as well. For full context see my comment here: https://github.com/cucumber/cucumber-jvm/pull/1010/files#r172397011

It doesn’t seem to be possible to work around this issue by implementing a Converter rather than a SingleValueConverter due to the way ParameterInfo::convert only wants a SingleValueConverter to work with (I don’t have a solid grasp of this area so if that sounds waffle-y it’s because it is!)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
davidyscottcommented, Mar 6, 2018

That’s interesting and good to know, thank you! #1311 does explain some of the difficulty I was having.

That said, it’s a 2-line change. If I manage to figure out my build issues, I’ll see about submitting a PR for it.

0reactions
lock[bot]commented, May 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Converters - XStream
Converter Supported types Prio NullConverter null values very high ArrayConverter any kind of array normal BooleanConverter boolean java.lang.Boolean normal
Read more >
XStream useAttributeFor not working - Stack Overflow
The problem is that the ResultState class is an enum type and that Xstream does not know how to pass enums as attributes...
Read more >
com.thoughtworks.xstream.converters.SingleValueConverter
Given a key, the escape method returns the filename which shall be used. ... @param converter The {@link SingleValueConverter} to be registered to...
Read more >
XStream User Guide: Converting Objects to XML - Baeldung
The default converter, i.e. the converter which will be used if no other registered converter is suitable, can be registered with priority ...
Read more >
How to register for Airtel Xstream: Step-by-step - India Today
Here is how you can register for Airtel Xstream. ... Airtel is a telecommunication company with a massive global user base and operations...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found