classpath
[Top][All Lists]
Advanced

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

Possible bug? java.nio.Buffer


From: Ito Kazumitsu
Subject: Possible bug? java.nio.Buffer
Date: Mon, 19 May 2003 11:58:16 +0900
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigory ōmae) APEL/10.3 Emacs/20.7 (i386-*-windows98.2222) MULE/4.1 (AOI) Meadow/1.14 (AWSAKA:62)

java/nio/Buffer.java has the following code:

  Buffer (int capacity, int limit, int position, int mark)
  {
    if (capacity < 0)
      throw new IllegalArgumentException ();

    cap = capacity;
    limit (limit);
    position (position);

    if (mark > 0)      ----(*)
    {
      if (mark > pos)
        throw new IllegalArgumentException ();

      this.mark = mark;
    }
  }

Should'nt the line marked with (*) be "if (mark >= 0)" ?




reply via email to

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