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

[cp-patches] Patch: fix Float/DoubleBuffer.compareTo in the presence of NaN

2005-12-06 Thread Anthony Green
This patch makes sure FloatBuffer and DoubleBuffer objects compare properly when they contain NaN values. I've already checked in Mauve tests cases. Ok to commit? AG 2005-12-06 Anthony Green [EMAIL PROTECTED] * java/nio/DoubleBuffer.java (compareTo): Handle NaN values within

[cp-patches] FYI: ViewportLayout fix

2005-12-06 Thread Roman Kennke
Hi, This is a small fix for the ViewportLayout. As it was before, the layout manager sets the size for the view to it's minimum when the port is smaller thant the view. This can't be correct. To be honest, I think it still isn't correct now, I don't have time to investigate more atm and it seems

Re: [cp-patches] [generics] RFC: fix generics branch compilation on Darwin

2005-12-06 Thread Archie Cobbs
Casey Marshall wrote: This puts the 'environ' declaration/define in jcl.h; I hope this is OK, it looks like the best place for a global thing like this. What you have now results in a duplicate declaration of environ on systems that already declare environ in unistd.h (or wherever), but don't

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

[cp-patches] FYI: Container fixlet

2005-12-06 Thread Roman Kennke
Mark pointed out that my fix from 2005-11-17 Roman Kennke [EMAIL PROTECTED] * java/awt/Container.java (Container): Added comment. (remove): Only call removeNotify if removed component is still showing. (paintComponents): Call paint() instead of

[cp-patches] FYI: JComponent fixlet

2005-12-06 Thread Roman Kennke
I removed an unneeded warning in JComponent. We used to print out this warning when a component has no UI installed. This probably was useful in the early days when some components didn't have a UI class yet or something like that. Today such a warning is completely superfluous and confuses some

Re: [cp-patches] Patch: fix Float/DoubleBuffer.compareTo in the presence of NaN

2005-12-06 Thread Tom Tromey
Anthony == Anthony Green [EMAIL PROTECTED] writes: Anthony This patch makes sure FloatBuffer and DoubleBuffer objects compare Anthony properly when they contain NaN values. I've already checked in Mauve Anthony tests cases. Ok to commit? Does it do the right thing if a is NaN and b is not?

Re: [cp-patches] Patch: Add security check to Class.getClasses()

2005-12-06 Thread Tom Tromey
Gary == Gary Benson [EMAIL PROTECTED] writes: Gary Class.getClasses() was not performing the member access checks like it Gary ought. The attached patch fixes. I'm working on mauve tests for all Gary of Class's security calls so there will be a check for this issue Gary soonish.

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] RFC: StringIndexOutOfBoundsException fixes inString contructors

2005-12-06 Thread Christian Thalinger
On Wed, 2005-11-02 at 12:50 +0100, Jeroen Frijters wrote: Christian Thalinger wrote: +if (offset + count 0 || offset + count ascii.length) You can write this more efficiently as: if (ascii.length - offset count) (This assumes that offset and count have previously been

Re: [cp-patches] FYI: Container fixlet

2005-12-06 Thread Roman Kennke
Hi Mark, Am Dienstag, den 06.12.2005, 18:49 +0100 schrieb Mark Wielaard: Hi Roman, On Tue, 2005-12-06 at 16:25 +, Roman Kennke wrote: 2005-12-06 Roman Kennke [EMAIL PROTECTED] PR classpath/25256 * java/awt/Container.java

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

[cp-patches] Patch: BoxLayout fix

2005-12-06 Thread Anthony Balkissoon
2005-12-06 Anthony Balkissoon [EMAIL PROTECTED] Fixes bug #25233 * javax/swing/BoxLayout.java: (maximumLayoutSize): Don't add the Insets to the Dimension calculated in checkTotalRequirements(). ___ Classpath-patches

[cp-patches] Patch: BoxLayout fix

2005-12-06 Thread Anthony Balkissoon
This patch fixes PR 25233. 2005-12-06 Anthony Balkissoon [EMAIL PROTECTED] Fixes bug #25233 * javax/swing/BoxLayout.java: (maximumLayoutSize): Don't add the Insets to the Dimension calculated in checkTotalRequirements(). --Tony Index:

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: BoxLayout fix

2005-12-06 Thread Anthony Balkissoon
I reverted this patch because it caused a Mauve regression. I'll have to write more tests and figure out what was wrong. regression: gnu.testlet.javax.swing.BoxLayout.maximumLayoutSize On Tue, 2005-12-06 at 14:52 -0500, Anthony Balkissoon wrote: This patch fixes PR 25233. 2005-12-06

[cp-patches] FYI: GridBagLayout.ArrangeGrid fix

2005-12-06 Thread Thomas Fitzsimmons
Hi, An application I was running exposed a crash in GridBagLayout.ArrangeGrid. I committed this fix. Tom 2005-12-06 Thomas Fitzsimmons [EMAIL PROTECTED] * java/awt/GridBagLayout.java (ArrangeGrid): Use info rather than layoutInfo in the component for loop. Cache layout

Re: [cp-patches] Patch: BoxLayout fix

2005-12-06 Thread Anthony Balkissoon
On Tue, 2005-12-06 at 15:58 -0500, Anthony Balkissoon wrote: I reverted this patch because it caused a Mauve regression. I'll have to write more tests and figure out what was wrong. regression: gnu.testlet.javax.swing.BoxLayout.maximumLayoutSize Okay, here's the new patch. It doesn't

Re: [cp-patches] FYI: Container fixlet

2005-12-06 Thread Mark Wielaard
[Sorry for the duplicate message, trouble with my primary email account] Hi Roman, On Tue, 2005-12-06 at 16:25 +, Roman Kennke wrote: 2005-12-06 Roman Kennke [EMAIL PROTECTED] PR classpath/25256 * java/awt/Container.java

[cp-patches] FYI: LookAndFeel.toString() fixlet

2005-12-06 Thread Mark Wielaard
Hi, Riccardo reported a bug off list about code that tried to parse the LookAndFeel.toString() result to find the actual Class name of the LookAndFeel subclass. Although this is highly questionable the big Swing book does indeed that toString() returns a string based on the description and class

[cp-patches] [generics] Patch: FYI: more genericization

2005-12-06 Thread Tom Tromey
I'm checking this in on the generics branch. Even more genericization that I somehow missed earlier. I really suspect japi is just feeding me methods and classes piecemeal somehow :-) This one includes some real bug fixes in javax.imageio. An earlier patch I made to ImageIO was in error, so I

[cp-patches] [generics] Patch: FYI: more genericization

2005-12-06 Thread Tom Tromey
I'm checking this in on the generics branch. This adds generics in to javax.security.auth.Subject. I think this covers everything in the japi report as of today (with a minor exception java.util; and it is a bit hard to be 100% sure as some of the things in the report have been fixed for a few

Re: [cp-patches] FYI: LookAndFeel.toString() fixlet

2005-12-06 Thread Tom Tromey
Mark == Mark Wielaard [EMAIL PROTECTED] writes: Mark Riccardo reported a bug off list about code that tried to parse the Mark LookAndFeel.toString() result to find the actual Class name of the Mark LookAndFeel subclass. Although this is highly questionable It would be nice if we had a

Re: [cp-patches] Patch: fix Float/DoubleBuffer.compareTo in the presence of NaN

2005-12-06 Thread Anthony Green
On Tue, 2005-12-06 at 11:12 -0700, Tom Tromey wrote: Anthony == Anthony Green [EMAIL PROTECTED] writes: Anthony This patch makes sure FloatBuffer and DoubleBuffer objects compare Anthony properly when they contain NaN values. I've already checked in Mauve Anthony tests cases. Ok to