classpath
[Top][All Lists]
Advanced

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

Class.getSuperclass comment bug


From: Patrick Doyle
Subject: Class.getSuperclass comment bug
Date: Mon, 2 Jul 2001 14:11:05 -0400 (EDT)

In vm/reference/java/lang/Class.java, the comments for the getSuperclass
method say this:

  Get the direct superclass of this class.  If this is
  an interface, it will get the direct superinterface.

However, there is no such thing as "the direct superinterface".  There can
be any number of direct superinterfaces for any class or interface.

The JDK docs say this:

  If this Class represents either the Object class, an interface, a
  primitive type, or void, then null is returned. If this object
  represents an array class then the Class object representing the Object
  class is returned.

AFAIK, this has been the case since JDK 1.0.

--
Patrick Doyle
address@hidden




reply via email to

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