Message:

   The following issue has been closed.

   Resolver: Sascha-Matthias Kulawik
       Date: Di, 12 Okt 2004 1:23 PM

Ive patched the util class, please test this against your use case.
---------------------------------------------------------------------
View the issue:
  http://team.andromda.org:8080/jira/browse/EJB-7

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: EJB-7
    Summary: [EJBMetafacadeUtils] getCreateMethod: inheritance bug
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: FIXED

 Original Estimate: 5 minutes
 Time Spent: Unknown
  Remaining: 5 minutes

    Project: EJB Cartridge

   Assignee: Sascha-Matthias Kulawik
   Reporter: Jens Kumpfmueller

    Created: Mo, 27 Sep 2004 10:58 AM
    Updated: Di, 12 Okt 2004 1:23 PM

Description:
getCreateMethod does not work correctly with inheritance and follow=true. Several 
changes needed, see patch below:

greetings Jens

Index: EJBMetafacadeUtils.java
===================================================================
RCS file: 
/cvsroot/andromda/cartridges/andromda-ejb/src/java/org/andromda/cartridges/ejb/metafacades/EJBMetafacadeUtils.java,v
retrieving revision 1.6
diff -u -r1.6 EJBMetafacadeUtils.java
--- EJBMetafacadeUtils.java     7 Aug 2004 18:40:35 -0000       1.6
+++ EJBMetafacadeUtils.java     27 Sep 2004 10:40:58 -0000
@@ -37,10 +37,10 @@
         final String methodName = "EJBMetafacadeUtils.getCreateMethods";
         ExceptionUtils.checkNull(methodName, "classifer", classifier);
         Collection retval = new ArrayList();
-        EJBEntityFacade entity = null;
+        EJBEntityFacade entity = (EJBEntityFacade) classifier;
         do
         {
-            Collection ops = classifier.getOperations();
+            Collection ops = entity.getOperations();
             for (Iterator i = ops.iterator(); i.hasNext();)
             {
                 OperationFacade op = (OperationFacade)i.next();
@@ -51,14 +51,10 @@
             }
             if (follow)
             {
-                entity = (EJBEntityFacade)classifier.getGeneralization();
-            }
-            else
-            {
-                break;
+                entity = (EJBEntityFacade)entity.getGeneralization();
             }
         }
-        while (entity != null);
+        while (follow && entity != null);
         return retval;
     }
 



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://team.andromda.org:8080/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Andromda-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-devel

Reply via email to