Closed GoogleCodeExporter closed 9 years ago
Are you sure you imported Constructor from SnakeYAML ?
Can you please show the complete source which fails to compile ?
Original comment by py4fun@gmail.com
on 18 Mar 2011 at 1:56
Here's the complete source:
package com.flirtomatic;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.Constructor;
public class YamlTest {
public void wontAllowYamlWithConstructor(){
//Just using String.class as an example
Constructor constructor = new Constructor(String.class);
Yaml yaml = new Yaml(constructor);
}
}
It seems that its specific to Eclipse as compilation outside of Eclipse
succeeds. snakeyaml is definitely on my Eclipse build path.
Actually, I just removed the testng jar from my Eclipse build path and the
above code now compiles (in Eclipse). There's a class in testNg called Yaml as
well so I guess Eclipse was not distinguishing classes properly. And now that
I've re-added the testng jar, Eclipse is still happy(!) Very strange, but its
not a SnakeYAML issue.
Thanks anyway.
Original comment by jsn.har...@gmail.com
on 18 Mar 2011 at 5:17
I assume you use TestNG 6.0:
http://beust.com/weblog/2011/03/15/announcing-testng-6-0/
Original comment by py4fun@gmail.com
on 18 Mar 2011 at 6:11
Original issue reported on code.google.com by
jsn.har...@gmail.com
on 18 Mar 2011 at 12:43