This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [PATCH] gnu.java.nio.FileChannelImpl - hack - comments appreciated
- From: Tom Tromey <tromey at redhat dot com>
- To: Michael Koch <konqueror at gmx dot de>
- Cc: java-patches at gcc dot gnu dot org
- Date: 01 Mar 2003 17:07:37 -0700
- Subject: Re: [PATCH] gnu.java.nio.FileChannelImpl - hack - comments appreciated
- References: <200302281321.26917.konqueror@gmx.de>
- Reply-to: tromey at redhat dot com
>>>>> "Michael" == Michael Koch <konqueror at gmx dot de> writes:
Michael> I made a little patch to make gnu.java.nio.FileChannelImpl more
Michael> working in trunk. Unfortunately it uses an IMO ugly hack:
Michael> It uses native methods to access the package private methods from
Michael> java.io.FileDescriptor. Is this allowed ? Should it be avoided ? What
Michael> should be done ?
This is definitely allowed. We already do this with FileDescriptor in
java.net; there's even a comment in FileDescriptor explaining that we
do it. I know we do it in other cases as well. It is a bit ugly, but
not really worse than the alternatives.
Tom