Details

    • Type: Sub-task Sub-task
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4
    • Fix Version/s: 1.0.5
    • Component/s: XML code generator
    • Labels:
      None
    • Number of attachments :
      2

      Description

      When generating fields/methods in Java 2 mode, Source Generator uses ArrayLists as a drop-in
      replacement for Vectors. This overlooks the flexibility possible with Java 2 collections. It would be
      better to use parameters/return values of type List so that code that uses the generated object
      model are not forced to convert to/from ArrayLists.

      1. patch.c1677.20061102.txt
        8 kB
        Werner Guttmann
      2. patch.c1677.20061102-002.txt
        7 kB
        Werner Guttmann

        Activity

        Hide
        Werner Guttmann added a comment -

        Initial patch for review, basically amending a few classes related to how the code generator handles collections to support distinction between collection interface signatures and collection instantiation.

        Show
        Werner Guttmann added a comment - Initial patch for review, basically amending a few classes related to how the code generator handles collections to support distinction between collection interface signatures and collection instantiation.
        Hide
        Werner Guttmann added a comment -

        Updated patch, re-adding the original constructor to JCollectionType, and reverting some of the other changes, as getInstanceName() now checks whether _instancename is not null, otherwise delegating to toString().

        Show
        Werner Guttmann added a comment - Updated patch, re-adding the original constructor to JCollectionType, and reverting some of the other changes, as getInstanceName() now checks whether _instancename is not null, otherwise delegating to toString().
        Hide
        Werner Guttmann added a comment -

        Just as a note for myself, one could now extend the binding file syntax to allow definition of the actual collection instance type.

        Show
        Werner Guttmann added a comment - Just as a note for myself, one could now extend the binding file syntax to allow definition of the actual collection instance type.
        Hide
        Werner Guttmann added a comment -

        Need to make it really clear in the release notes that this is happening, and scan all samples for usage of java.util.ArrayList as well.

        Show
        Werner Guttmann added a comment - Need to make it really clear in the release notes that this is happening, and scan all samples for usage of java.util.ArrayList as well.
        Hide
        Edward Kuns added a comment -

        I definitely like the idea of using a truer J2 collection. Patch looks reasonable to me.

        Show
        Edward Kuns added a comment - I definitely like the idea of using a truer J2 collection. Patch looks reasonable to me.
        Hide
        Werner Guttmann added a comment -

        Bulk-closing all issues assigned to 1.0.5. Please feel free to re-open any of those when required.

        Show
        Werner Guttmann added a comment - Bulk-closing all issues assigned to 1.0.5. Please feel free to re-open any of those when required.

          People

          • Assignee:
            Werner Guttmann
            Reporter:
            Werner Guttmann
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1 hour, 30 minutes
              1h 30m
              Remaining:
              Time Spent - 1 hour Remaining Estimate - 30 minutes
              30m
              Logged:
              Time Spent - 1 hour Remaining Estimate - 30 minutes
              1h