db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/metadata DescriptorRepository.java
Date Fri, 30 Jan 2004 10:50:09 GMT
arminw      2004/01/30 02:50:09

  Modified:    src/java/org/apache/ojb/broker/metadata
                        DescriptorRepository.java
  Log:
  add patch by Ilkka Priha to avoid infinite
  recursion when DescriptorRepository resolves
  extent classes of the parent
  
  Revision  Changes    Path
  1.46      +11 -1     db-ojb/src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java
  
  Index: DescriptorRepository.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- DescriptorRepository.java	7 Jan 2004 19:11:10 -0000	1.45
  +++ DescriptorRepository.java	30 Jan 2004 10:50:09 -0000	1.46
  @@ -362,6 +362,11 @@
           {
               Class extentClass = (Class) iter.next();
               ClassDescriptor extCld = getDescriptorFor(extentClass);
  +            if (aCld.equals(extCld))
  +            {
  +                // prevent infinite recursion caused by cyclic references
  +                continue;
  +            }
               if (!extCld.isInterface())
               {
                   concreteSubclasses.add(extentClass);
  @@ -391,6 +396,11 @@
           {
               Class extentClass = (Class) iter.next();
               ClassDescriptor extCld = getDescriptorFor(extentClass);
  +            if (aCld.equals(extCld))
  +            {
  +                // prevent infinite recursion caused by cyclic references
  +                continue;
  +            }
               if (!extCld.isInterface())
               {
                   concreteSubclassClds.add(extCld);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message