No single argument constructor found for class

Issue #336 wontfix
Matthew Tyson created an issue

Appologies if this is documented somewhere.

I have an object notation like so: class: !!my.group.MyClass

MyClass does have a 0 arg constructor.

And I get this error: org.yaml.snakeyaml.error.YAMLException: No single argument constructor found for class my.group

If I change the notation to this: class: !!my.group.MyClass []

It works fine.

Comments (3)

  1. Matthew Tyson reporter

    Yes it does, that is the same issue.

    Is there a way to tell SnakeYaml to use the 0 arg constructor instead of an empty string when the constructor field is blank?

    It is easy enough to workaround by using the empty constructor syntax (!!my.group.MyClass []) so not a big issue really... Just a elegance of the Yaml matter.

  2. Log in to comment