bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/25769] New: AbstractCollection.toString differers a bit.


From: subanark at gmail dot com
Subject: [Bug classpath/25769] New: AbstractCollection.toString differers a bit.
Date: 12 Jan 2006 18:04:33 -0000

I know I'm being a bit assine on these issues, but...

Despite Sun's documentation of toString on AbstractCollection, it handles the
case where an element of the collection is in fact itsself.

E.g. the following code:
import java.util.*;
public class Test
{
   public static void main(String[] args)
   {
      ArrayList list = new ArrayList();
      list.add(list);
      System.out.println(list);
      ArrayList list2 = new ArrayList();
      list2.add(list);
      list.add(list2);
      System.out.println(list);
   }
}
produces on sun:
[(this Collection)]
<<Stack Overflow error>>

and (what should) on IKVM:
<<Stack Overflow error>>

(what IKVM actually produces is fatal stack overflow error).


-- 
           Summary: AbstractCollection.toString differers a bit.
           Product: classpath
           Version: 0.19
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: subanark at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25769





reply via email to

[Prev in Thread] Current Thread [Next in Thread]