Re: [cp-patches] Patch: Opening RandomAccessFiles requires excessive permission

2005-12-08 Thread Gary Benson
David Daney wrote: Gary Benson wrote: David Daney wrote: Gary Benson wrote: ...I'll commit my original patch for now. I hate to sound like I have a burr under the saddle, but does anybody see any merit whatsoever in changing the exception text as I suggested in my previous

Re: [cp-patches] Patch: Opening RandomAccessFiles requires excessive permission

2005-12-07 Thread Gary Benson
Tom Tromey wrote: Twisti == Christian Thalinger [EMAIL PROTECTED] writes: Twisti Yeah, i didn't take it personally :-) Of course i see your Twisti point, but what i'm trying to say is, if we ever want to Twisti catch up (or even be better) than sun or other proprietary Twisti JVMs, we should

Re: [cp-patches] Patch: Opening RandomAccessFiles requires excessive permission

2005-12-07 Thread Gary Benson
David Daney wrote: Gary Benson wrote: ...I'll commit my original patch for now. I hate to sound like I have a burr under the saddle, but does anybody see any merit whatsoever in changing the exception text as I suggested in my previous response to the patch? What did you suggest? I saw

Re: [cp-patches] Patch: Opening RandomAccessFiles requires excessive permission

2005-12-07 Thread David Daney
Gary Benson wrote: David Daney wrote: Gary Benson wrote: ...I'll commit my original patch for now. I hate to sound like I have a burr under the saddle, but does anybody see any merit whatsoever in changing the exception text as I suggested in my previous response to the patch? What did

Re: [cp-patches] Patch: Opening RandomAccessFiles requires excessive permission

2005-12-07 Thread Tom Tromey
David == David Daney [EMAIL PROTECTED] writes: David I hate to sound like I have a burr under the saddle, but does anybody David see any merit whatsoever in changing the exception text as I suggested David in my previous response to the patch? Yes, I was in favor of this as well. Tom

Re: [cp-patches] Patch: Opening RandomAccessFiles requires excessive permission

2005-12-06 Thread Christian Thalinger
On Mon, 2005-12-05 at 14:42 +, Gary Benson wrote: public void write (int oneByte) throws IOException { +if (out == null) + throw new IOException(Bad file descriptor); + out.write(oneByte); I don't know if this is performance critical code or is used very often, but

Re: [cp-patches] Patch: Opening RandomAccessFiles requires excessive permission

2005-12-06 Thread Archie Cobbs
Christian Thalinger wrote: I don't know if this is performance critical code or is used very often, but this seems to be a special case and i'd suggest something like: public void write (int oneByte) throws IOException { try { out.write(oneByte); return; } catch

Re: [cp-patches] Patch: Opening RandomAccessFiles requires excessive permission

2005-12-06 Thread Christian Thalinger
On Tue, 2005-12-06 at 10:00 -0600, Archie Cobbs wrote: That's getting into the micro-optimzation realm, which is fraught with danger and mistaken assumptions :-) E.g., on some machines the time overhead of setting up a try/catch in a method that wouldn't otherwise have one is higher than the

Re: [cp-patches] Patch: Opening RandomAccessFiles requires excessive permission

2005-12-06 Thread Archie Cobbs
Christian Thalinger wrote: That's getting into the micro-optimzation realm, which is fraught with danger and mistaken assumptions :-) E.g., on some machines the time overhead of setting up a try/catch in a method that wouldn't otherwise have one is higher than the single comparison required to

Re: [cp-patches] Patch: Opening RandomAccessFiles requires excessive permission

2005-12-06 Thread David Daney
Christian Thalinger wrote: On Tue, 2005-12-06 at 10:00 -0600, Archie Cobbs wrote: That's getting into the micro-optimzation realm, which is fraught with danger and mistaken assumptions :-) E.g., on some machines the time overhead of setting up a try/catch in a method that wouldn't otherwise

Re: [cp-patches] Patch: Opening RandomAccessFiles requires excessive permission

2005-12-06 Thread Christian Thalinger
On Tue, 2005-12-06 at 13:32 -0600, Archie Cobbs wrote: You say the generated code is smaller but that depends on who generates the code (if you mean the generated Java bytecode, I'd guess you're wrong there too because of the extra exception table required). And that depends on which VM you're

Re: [cp-patches] Patch: Opening RandomAccessFiles requires excessive permission

2005-12-06 Thread Archie Cobbs
Christian Thalinger wrote: what i'm trying to say is, if we ever want to catch up (or even be better) than sun or other proprietary JVMs, we should think about optimizing some core functions in classpath... I definitely agree there. -Archie

Re: [cp-patches] Patch: Opening RandomAccessFiles requires excessive permission

2005-12-06 Thread Tom Tromey
Twisti == Christian Thalinger [EMAIL PROTECTED] writes: Twisti Yeah, i didn't take it personally :-) Of course i see your point, but Twisti what i'm trying to say is, if we ever want to catch up (or even be Twisti better) than sun or other proprietary JVMs, we should think about Twisti

Re: [cp-patches] Patch: Opening RandomAccessFiles requires excessive permission

2005-12-05 Thread David Daney
Gary Benson wrote: Hi all, Opening a java.io.RandomAccessFile in read-only mode with a security manager in force requires the permission to write file descriptors. The attached patch fixes. Anyone mind if I commit? Cheers, Gary