[PATCH] gnu.java.nio.FileChannelImpl - hack - comments appreciated
Tom Tromey
tromey@redhat.com
Sun Mar 2 00:16:00 GMT 2003
>>>>> "Michael" == Michael Koch <konqueror@gmx.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
More information about the Java-patches
mailing list