XSD2JavaGenerator generates Java identifier with dots
-----------------------------------------------------
Key: TUSCANY-1853
URL: https://issues.apache.org/jira/browse/TUSCANY-1853
Project: Tuscany
Issue Type: Bug
Components: Java SDO Tools
Affects Versions: Java-SDO-1.0
Environment: Windows XP, jre 1.5
Reporter: Cezary Tkaczyk
Hello,
While I'm trying to compile generated by XSD2JavaGenerator Java classes, I've
got such an error:
[javac]
C:\projekty\eclipse-workspace-rbpl-sdo-1.0\REB-Catalog-SDO-Java\src-autogen\pl\esb\impl\EsbFactoryImpl.java:169:
';' expected
[javac] pl.esb.blm.adapter.AdapterFactory
pl.esb.blm.adapter.AdapterFactoryInstance =
pl.esb.blm.adapter.AdapterFactory.INSTANCE;
[javac] ^
The problem is: variable identifier cannot contain dots.
The place, where this error appears looks like this:
public static EsbFactoryImpl init()
{
if (instance != null ) return instance;
instance = new EsbFactoryImpl();
// Initialize dependent packages
AdapterFactory AdapterFactoryInstance = AdapterFactory.INSTANCE;
RebFactory RebFactoryInstance = RebFactory.INSTANCE;
pl.raiffeisen.esb.blm.adapter.AdapterFactory
pl.raiffeisen.esb.blm.adapter.AdapterFactoryInstance =
pl.raiffeisen.esb.blm.adapter.AdapterFactory.INSTANCE;
// Create package meta-data objects
instance.createMetaData();
// Initialize created meta-data
instance.initializeMetaData();
// Mark meta-data to indicate it can't be changed
//theEsbFactoryImpl.freeze(); //FB do we need to freeze / should we freeze
????
return instance;
}
I think the problem is that I have two namespaces of the same suffix:
http://www.esb.pl/blm/adapter
http://www.esb.pl/ods1/adapter
So, generator is trying to avoid the problem creating unique variable name:
pl.esb.blm.adapter.AdapterFactoryInstance
Unfortunately, this is not valid identifier.
Kind Regards,
Czarek
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]