dev@jaxb.java.net

Re: name algorithm changes

From: Ryan Shoemaker - JavaSoft East <Ryan.Shoemaker_at_Sun.COM>
Date: Thu, 23 Jun 2005 11:44:34 -0400

Ryan Shoemaker - JavaSoft East wrote:
> Kohsuke,
>
> I noticed that some of my J2S unit tests are failing because of
> post-EA2 naming changes.
>

Looks like this diff is the culprit. I'm not going to modify any
of my tests until we get concensus on whether or not this is the
correct name algorithm.

Thanks,

--Ryan

attached mail follows:



User: kohsuke
Date: 2005/06/14 10:27:20

Log:
 modified to use a dumber captization algorithm to follow the spec.

File Changes:

Directory: /jaxb2-sources/jaxb-ri/runtime/src/com/sun/xml/bind/v2/model/impl/
=============================================================================

File [changed]: ERPropertyInfoImpl.java
Url: https://jaxb2-sources.dev.java.net/source/browse/jaxb2-sources/jaxb-ri/runtime/src/com/sun/xml/bind/v2/model/impl/ERPropertyInfoImpl.java?r1=1.5&r2=1.6
Delta lines: +5 -4
-------------------
--- ERPropertyInfoImpl.java 26 May 2005 00:08:20 -0000 1.5
+++ ERPropertyInfoImpl.java 14 Jun 2005 17:27:17 -0000 1.6
@@ -1,12 +1,13 @@
 package com.sun.xml.bind.v2.model.impl;
 
-import javax.xml.namespace.QName;
-import javax.xml.bind.annotation.XmlElementWrapper;
+import java.beans.Introspector;
+
 import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlSchema;
+import javax.xml.namespace.QName;
 
 import com.sun.xml.bind.v2.TODO;
-import com.sun.xml.bind.v2.NameConverter;
 
 /**
  * Common part of {_at_link ElementPropertyInfoImpl} and {_at_link ReferencePropertyInfoImpl}.
@@ -77,7 +78,7 @@
         // compute the default
         TODO.checkSpec();
         if(local.length()==0 || local.equals("##default"))
- local = NameConverter.standard.toVariableName(getName());
+ local = Introspector.decapitalize(getName());
         if(uri.equals("##default")) {
             XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
             // JAX-RPC doesn't want the default namespace URI swapping to take effect to




---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe_at_jaxb2-sources.dev.java.net
For additional commands, e-mail: cvs-help_at_jaxb2-sources.dev.java.net