Imported GNU Classpath 0.20
Imported GNU Classpath 0.20
* Makefile.am (AM_CPPFLAGS): Add classpath/include.
* java/nio/charset/spi/CharsetProvider.java: New override file.
* java/security/Security.java: Likewise.
* sources.am: Regenerated.
* Makefile.in: Likewise.
From-SVN: r109831
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* FileChannelImpl.java --
|
||||
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
@@ -301,8 +301,10 @@ public final class FileChannelImpl extends FileChannel
|
||||
else if (mode == MapMode.READ_WRITE || mode == MapMode.PRIVATE)
|
||||
{
|
||||
nmode = mode == MapMode.READ_WRITE ? '+' : 'c';
|
||||
if ((this.mode & (READ|WRITE)) != (READ|WRITE))
|
||||
if ((this.mode & WRITE) != WRITE)
|
||||
throw new NonWritableChannelException();
|
||||
if ((this.mode & READ) != READ)
|
||||
throw new NonReadableChannelException();
|
||||
}
|
||||
else
|
||||
throw new IllegalArgumentException ("mode: " + mode);
|
||||
|
||||
Reference in New Issue
Block a user