Re: [PATCH 0/2] Class- and class loader-local storage (Bug ID #6493635)

2009-03-02 Thread David M. Lloyd
On 03/02/2009 10:45 PM, Bob Lee wrote: David, Here's the problem I'd like to see solved: enable a library to hold an indirect reference to a Class without preventing that Class's loader from being reclaimed. The reclamation should happen automatically when the loader is not otherwise strongly

Re: [PATCH 0/2] Class- and class loader-local storage (Bug ID #6493635)

2009-03-02 Thread Bob Lee
David, Here's the problem I'd like to see solved: enable a library to hold an indirect reference to a Class without preventing that Class's loader from being reclaimed. The reclamation should happen automatically when the loader is not otherwise strongly referenced. You added a further requiremen

Re: Fix for 5015163, and my first webrev

2009-03-02 Thread Kevin Bourrillion
Bumping this thread. From the peanut gallery, I believe that Rémi's change is extremely worthy. I have more nitpicking I'd like to do on it, but am holding off until we learn whether Sun would accept it in any shape. At this point, it's still very mysterious to me how this will work (small, simp

hg: jdk7/tl/jdk: 6549506: Specification of Permission.toString() method contradicts with JDK implementation

2009-03-02 Thread xuelei . fan
Changeset: b656e842e1be Author:xuelei Date: 2009-03-02 23:17 +0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/b656e842e1be 6549506: Specification of Permission.toString() method contradicts with JDK implementation Summary: update the spec, and add double quotes around componen

Re: [PATCH 0/2] Class- and class loader-local storage (Bug ID #6493635)

2009-03-02 Thread David M. Lloyd
On 02/27/2009 07:08 PM, Bob Lee wrote: David, I regret making my suggestion in the first place. I really think we need ephemerons, but for the sake of discussion: OK, so you say that you don't think this feature should exist, period, until and unless ephemerons are implemented. Why? There'

Re: How to get FileChannel from resource

2009-03-02 Thread Ulf Zibis
Am 02.03.2009 14:18, Alan Bateman schrieb: Ulf Zibis wrote: Sherman, yes, you are right. That's not what I'm looking for. This would be slower, than reading the stream directly, because the underlying byte array will be copied 2 times by BufferedInputStream# + Channels.ReadableByteChannelImpl

Re: How to get FileChannel from resource

2009-03-02 Thread Ulf Zibis
Am 02.03.2009 14:13, Tom Hawtin schrieb: Ulf Zibis wrote: Anyway, I'm looking for a DirectBuffer directly from a resource file. So I think there is something missing: URL.openChannel() or Class#getResourceAsChannel() Maybe there is a way to get a RamdomAccessFile from URL to get the Channel

Re: How to get FileChannel from resource

2009-03-02 Thread Alan Bateman
Ulf Zibis wrote: Sherman, yes, you are right. That's not what I'm looking for. This would be slower, than reading the stream directly, because the underlying byte array will be copied 2 times by BufferedInputStream# + Channels.ReadableByteChannelImpl#read(), ... but maybe not, because looping

Re: How to get FileChannel from resource

2009-03-02 Thread Tom Hawtin
Ulf Zibis wrote: Anyway, I'm looking for a DirectBuffer directly from a resource file. So I think there is something missing: URL.openChannel() or Class#getResourceAsChannel() Maybe there is a way to get a RamdomAccessFile from URL to get the Channel from. Anybody knows ? If it's a file URL

Re: How to get FileChannel from resource

2009-03-02 Thread Ulf Zibis
Sherman, yes, you are right. That's not what I'm looking for. This would be slower, than reading the stream directly, because the underlying byte array will be copied 2 times by BufferedInputStream# + Channels.ReadableByteChannelImpl#read(), ... but maybe not, because looping BufferedInputStrea