FAQ
Class generator - incorrect java types for classes like java.lang.whatever.XYZ
------------------------------------------------------------------------------

Key: CAY-646
URL: http://issues.apache.org/cayenne/browse/CAY-646
Project: Cayenne
Type: Bug

Components: Cayenne Core Library
Versions: 1.2 [STABLE], 2.0 [STABLE], 3.0
Reporter: Andrus Adamchik
Assigned to: Andrus Adamchik
Priority: Trivial
Fix For: 3.0


When a java type of an attribute starts with "java.lang" and contains at least 3 parts in the package path, "java.lang." is incorrectly stripped during class generation (1.1 variety). E.g. the last line fails in this test:

public void testFormatJavaType() {
ClassGenerationInfo info = new ClassGenerationInfo();

assertEquals("x.X", info.formatJavaType("x.X"));
assertEquals("X", info.formatJavaType("java.lang.X"));
assertEquals("java.lang.x.X", info.formatJavaType("java.lang.x.X"));
}

Looks like 1.2 generator is free from this problem.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/cayenne/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira

Search Discussions

  • Mike Kienenberger at Sep 12, 2006 at 5:54 pm
    I think for 3.0 that it's time to dump cgen 1.1, or at least change
    1.2 to be the default generator.

    Our original roadmap was to keep 1.1 for 1.2, change to 1.2 as the
    default for 1.3, and remove 1.1 at ?.
    On 9/1/06, Andrus Adamchik (JIRA) wrote:
    Class generator - incorrect java types for classes like java.lang.whatever.XYZ
    ------------------------------------------------------------------------------

    Key: CAY-646
    URL: http://issues.apache.org/cayenne/browse/CAY-646
    Project: Cayenne
    Type: Bug

    Components: Cayenne Core Library
    Versions: 1.2 [STABLE], 2.0 [STABLE], 3.0
    Reporter: Andrus Adamchik
    Assigned to: Andrus Adamchik
    Priority: Trivial
    Fix For: 3.0


    When a java type of an attribute starts with "java.lang" and contains at least 3 parts in the package path, "java.lang." is incorrectly stripped during class generation (1.1 variety). E.g. the last line fails in this test:

    public void testFormatJavaType() {
    ClassGenerationInfo info = new ClassGenerationInfo();

    assertEquals("x.X", info.formatJavaType("x.X"));
    assertEquals("X", info.formatJavaType("java.lang.X"));
    assertEquals("java.lang.x.X", info.formatJavaType("java.lang.x.X"));
    }

    Looks like 1.2 generator is free from this problem.

    --
    This message is automatically generated by JIRA.
    -
    If you think it was sent incorrectly contact one of the administrators:
    http://issues.apache.org/cayenne/secure/Administrators.jspa
    -
    For more information on JIRA, see:
    http://www.atlassian.com/software/jira
  • Andrus Adamchik at Sep 12, 2006 at 6:00 pm

    On Sep 12, 2006, at 1:54 PM, Mike Kienenberger wrote:

    I think for 3.0 that it's time to dump cgen 1.1, or at least change
    1.2 to be the default generator.

    Our original roadmap was to keep 1.1 for 1.2, change to 1.2 as the
    default for 1.3, and remove 1.1 at ?.
    +1 ... then we can dump the entire concept of the template version.

    One question. Is it possible to make foundrylogic jar dependency
    optional (only if you include vpp stuff in the context)?

    Andrus
  • Mike Kienenberger at Sep 12, 2006 at 6:04 pm

    On 9/12/06, Andrus Adamchik wrote:
    On Sep 12, 2006, at 1:54 PM, Mike Kienenberger wrote:

    I think for 3.0 that it's time to dump cgen 1.1, or at least change
    1.2 to be the default generator.

    Our original roadmap was to keep 1.1 for 1.2, change to 1.2 as the
    default for 1.3, and remove 1.1 at ?.
    +1 ... then we can dump the entire concept of the template version.

    One question. Is it possible to make foundrylogic jar dependency
    optional (only if you include vpp stuff in the context)?
    I think it's already the case that foundrylogic jar is optional -- I
    recall we addressed this in the past and it's only a compile-time
    dependency, not a runtime one.
  • Andrus Adamchik at Sep 12, 2006 at 6:07 pm

    On Sep 12, 2006, at 2:04 PM, Mike Kienenberger wrote:
    On 9/12/06, Andrus Adamchik wrote:
    On Sep 12, 2006, at 1:54 PM, Mike Kienenberger wrote:

    I think for 3.0 that it's time to dump cgen 1.1, or at least change
    1.2 to be the default generator.

    Our original roadmap was to keep 1.1 for 1.2, change to 1.2 as the
    default for 1.3, and remove 1.1 at ?.
    +1 ... then we can dump the entire concept of the template version.

    One question. Is it possible to make foundrylogic jar dependency
    optional (only if you include vpp stuff in the context)?
    I think it's already the case that foundrylogic jar is optional -- I
    recall we addressed this in the past and it's only a compile-time
    dependency, not a runtime one.
    Great. Than I see no obstacles moving ahead with it.

    Andrus

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriescayenne
postedSep 1, '06 at 9:47p
activeSep 12, '06 at 6:07p
posts5
users3
websitecayenne.apache.org

People

Translate

site design / logo © 2022 Grokbase