mbenson     2005/08/05 15:38:30

  Modified:    src/main/org/apache/tools/ant/types/resources Sort.java
  Log:
  guard against no comparators on circular ref. check
  
  Revision  Changes    Path
  1.3       +7 -5      
ant/src/main/org/apache/tools/ant/types/resources/Sort.java
  
  Index: Sort.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/types/resources/Sort.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Sort.java 5 Aug 2005 22:04:40 -0000       1.2
  +++ Sort.java 5 Aug 2005 22:38:30 -0000       1.3
  @@ -163,11 +163,13 @@
           if (isReference()) {
               super.dieOnCircularReference(stk, p);
           } else {
  -            for (Iterator i = comp.v.iterator(); i.hasNext();) {
  -                Object o = i.next();
  -                if (o instanceof DataType) {
  -                    stk.push(o);
  -                    invokeCircularReferenceCheck((DataType) o, stk, p);
  +            if (comp.v != null && comp.v.size() > 0) {
  +                for (Iterator i = comp.v.iterator(); i.hasNext();) {
  +                    Object o = i.next();
  +                    if (o instanceof DataType) {
  +                        stk.push(o);
  +                        invokeCircularReferenceCheck((DataType) o, stk, p);
  +                    }
                   }
               }
               setChecked(true);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to