This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: New NIO code needs refactoring
- From: Per Bothner <per at bothner dot com>
- To: Michael Koch <konqueror at gmx dot de>
- Cc: java at gcc dot gnu dot org
- Date: Tue, 16 Mar 2004 23:01:00 -0800
- Subject: Re: New NIO code needs refactoring
- References: <200403161358.46512.konqueror@gmx.de>
Michael Koch wrote:
while trying to merge your new cool NIO code into GNU classpath I found
out that it relies on the this old GCJ bug that allows accessing
package-private classes in other packages.
I was at first confused, but I think you mean that CNI allows you
to bypass strict Java access-control. That's not necassrily a bug;
it does conpendate for teh lack of "friend".
Jikes doesnt allow this and its not valid either.
This is what made me think you were talking of the gcj compiler, but
you're actually talking about gcjh and g++, I think.
I ran into this issue months ago too and moved
gnu.java.nio.channels.FileChannelImpl to java.nio package.
The problem with that is that FileChannelImpl needs to be accessible
from java.io, for FileInputStream etc.
Can you refactor your code to allow comilation with jikes please ?
I tried the obvious solution of moving MappedByteBufferImpl to
gnu.java.nio, but that requires moving DirectByteBufferImpl and
ByteBufferHelper as well. And then I assume we'll run into
problems with needin access to fields. That's probably solvable,
but bottom line it's hard to do it without cheatin somewhere.
And someone really needs to solve this issue.
I'm not sure there's an actual problem. You're trying to write
in Java that might require native methods.
I'll do some more experiments moving classes around.
--
--Per Bothner
per@bothner.com http://per.bothner.com/