OpenJPA
  1. OpenJPA
  2. OPENJPA-2156

Fix bug in org.apache.openjpa.persistence.util.SourceCode to correctly generate imports.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0, 2.3.0
    • Fix Version/s: 2.2.1, 2.3.0
    • Component/s: None
    • Labels:

      Description

      In SourceCode we incorrectly ignore adding ClassNames who's package starts with java.util to the collection of imports. For example, when a generated source file uses a java.util.Map, an import won't be created.

        Activity

        Hide
        Rick Curtis added a comment -

        Committed code changes to trunk and 2.2.x.

        Show
        Rick Curtis added a comment - Committed code changes to trunk and 2.2.x.
        Hide
        Rick Curtis added a comment -

        Also added support for generating a final class to trunk and 2.2.1.

        Show
        Rick Curtis added a comment - Also added support for generating a final class to trunk and 2.2.1.
        Hide
        Pinaki Poddar added a comment -

        > we incorrectly ignore adding ClassNames who's package starts with java.util
        where did you see that? I thought it was "java.lang.*" that was ignored.

        Show
        Pinaki Poddar added a comment - > we incorrectly ignore adding ClassNames who's package starts with java.util where did you see that? I thought it was "java.lang.*" that was ignored.
        Hide
        Rick Curtis added a comment -

        > I thought it was "java.lang.*" that was ignored.
        You are correct that using java.lang.* classes won't generate an import... but that is a problem for some java.lang classes. ie: Map.

        Show
        Rick Curtis added a comment - > I thought it was "java.lang.*" that was ignored. You are correct that using java.lang.* classes won't generate an import... but that is a problem for some java.lang classes. ie: Map.

          People

          • Assignee:
            Rick Curtis
            Reporter:
            Rick Curtis
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development