Re: Patches for "Import EOModel"

From: Mike Kienenberger (mkienen..laska.net)
Date: Sat Sep 06 2003 - 14:20:37 EDT

  • Next message: Mike Kienenberger: "Improved EOModel support"

    Andrus Adamchik <andru..bjectstyle.org> wrote:
    > Just applied both patches. I had to fix a unit test failing with NPE in
    > "getPrototypeAttributeMapFor". Other than that patches went through
    > unchanged.

    Ok. I see where that problem would occur.

    ====
            public Map getPrototypeAttributeMapFor(String aPrototypeAttributeName)
            {
                    if (null == prototypeValues)
                    {
                            prototypeValues = new HashMap();
                    
                            Map eoPrototypesEntityMap = this.entityInfo("EOPrototypes");
    ====

    Needs a line after it for models with no EOPrototypes:

                            if (null == eoPrototypesEntityMap) return Collections.EMPTY_MAP;

    Actually, it probably should be refactored as below, but the above is a
    quick fix.

                            if (null != eoPrototypesEntityMap)
                            {
                                    // parse it
                            }

    Now that these changes are in there, I'll dump my current Eclipse project,
    and start over from scratch, and hopefully I'll be able to start with the
    latest CVS snapshot this time.

    -Mike



    This archive was generated by hypermail 2.0.0 : Sat Sep 06 2003 - 14:18:10 EDT