Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-1141

The dependency/imported package was not initialized if the codegen tool was provided with -javaPackage option for the target codegen package

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Java-SDO-beta1
    • Java-SDO-beta1
    • Java SDO Tools
    • None
    • Patch Available

    Description

      There are base.xsd and sample.xsd where sample.xsd imports the base.xsd. When running the codegen tool with and without -javaPackage switch, two different results occur.

      With "-javaPackage org.example.sample", the init() of SampleFactoryImpl.java contains -
      // Initialize simple dependencies
      SDOUtil.registerStaticTypes(SampleFactory.class); ==> Should be SDOUtil.registerStaticTypes(BaseFactory.class);
      SDOUtil.registerStaticTypes(SDOFactory.class);
      SDOUtil.registerStaticTypes(ModelFactory.class);

      Without the switch, the init() contains -
      // Initialize simple dependencies
      SDOUtil.registerStaticTypes(BaseFactory.class);
      SDOUtil.registerStaticTypes(SDOFactory.class);
      SDOUtil.registerStaticTypes(ModelFactory.class);

      Attachments

        1. 1141.patch
          1 kB
          Fuhwei Lwo
        2. base.xsd
          0.4 kB
          Fuhwei Lwo
        3. sample.xsd
          0.5 kB
          Fuhwei Lwo

        Activity

          People

            Unassigned Unassigned
            fuhwei Fuhwei Lwo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: