Greg Holmberg wrote:

cannot resolve symbol
symbol : method valueOf (java.lang.Object)
location: class com.inxight.smartsearch.metadata.PropertyType

statement.setObject(index,


java.lang.String.valueOf(String.valueOf(value)));


That's odd, the method does exist on 1.4.2:
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html

What JDK are you compiling with?



[Greg] 1.4.2_06

Yes, it was odd that other xxxEnum.java files compiled just fine.  I
think I've discovered the difference, although I can't explain why it
should cause a problem.

In this particular Enumeration Class, "PropertyType", I have attributes
with names like "Date" and "String".  So in the PropertyType.java file
in common\target\src, it would generate code like this:

   public static final PropertyType String = new PropertyType("s");

Although this compiled fine, I think this somehow confused the compiler
when it processed the subclass PropertyTypeEnum.java in core\target\src.

So the easy work-around for me was to simply rename my attributes to not
clash with Java class names.  Now it all compiles just fine.

It would of course be nice if AndroMDA never, under any circumstances,
generated uncompilable code, but I can't think of a way to idiot-proof
AndroMDA against idiots like me naming attributes the same as Java
classes.  And even if you could think of a way, I would think it would
be way down the priority list.



:) I can also just make String.valueOf() fully qualified, which would fix your issue.

Greg








------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Andromda-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to