Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Java-SCA-M2
-
None
-
WinXP (tested with Java-SDO-M2 and Java-SDO-M3-RC3)
Description
The static SDO generator generates an erroneous factory class, when inheritance and different Java packages are used.
The initializeMetaData() method in my generated FactoryImpl class has this piece of code:
...
// Obtain other dependent packages
SdtFactoryImpl theSdtPackageImpl_1 =
(SdtFactoryImpl)FactoryBase.getStaticFactory(SdtFactoryImpl.NAMESPACE_URI);
...
// Add supertypes to types
addSuperType(myClassType, mySuperClassType);
...
But the variable "mySuperClassType" cannot be resolved at this point, because it is defined in a different package.
The code probably should look like this:
addSuperType(myClassType, theSdtPackageImpl_1.getMySuperClass());
I noticed this bug when using M3-RC3, where the -noEmf option is always turned on.
The factory/package code is correctly generated with M2, if the -noEmf option is NOT specified, but the same error occurs when the -noEmf option is specified with M2.