Author: richard.opalka(a)jboss.com
Date: 2008-04-14 09:34:48 -0400 (Mon, 14 Apr 2008)
New Revision: 6418
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/SourceWrapperGenerator.java
Log:
take care of reserved keywords when generating jaxws artifacts
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/SourceWrapperGenerator.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/SourceWrapperGenerator.java 2008-04-14
13:04:11 UTC (rev 6417)
+++
stack/native/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/SourceWrapperGenerator.java 2008-04-14
13:34:48 UTC (rev 6418)
@@ -132,6 +132,7 @@
private void addProperty(JDefinedClass clazz, String typeName, QName name, String
variable)
throws ClassNotFoundException
{
+ variable = JavaUtils.isReservedKeyword(variable) ? "_" + variable :
variable;
Class type = JavaUtils.loadJavaType(typeName, loader);
JFieldVar field = clazz.field(JMod.PRIVATE, type, variable);
JAnnotationUse annotation = field.annotate(XmlElement.class);