Re: [cp-patches] Patch: improve error handling in String

2005-09-14 Thread David Daney
Anthony Green wrote: - // XXX - Ignore coding exceptions? They shouldn't really happen. - return null; + // This shouldn't really happen. + throw new Error(e); Whould it be better to use InternalError? That is a little more specific. David Daney _

Re: [cp-patches] Patch: fix || expressions in jdwp code

2005-09-14 Thread Keith Seitz
Anthony Green wrote: These | operators should have been ||. Ok? Well, I don't know if you think you need permission from me, but I would say, "How the heck did that escape my attention???" Puzzled (and grateful), Keith ___ Classpath-patches mail

[cp-patches] Patch: minor URLStreamHandler cleanup

2005-09-14 Thread Anthony Green
All this does is remove a redundant null pointer check. This could never be null since we would have thrown an exception a couple of lines before (see the first line of the patch). Ok? AG 2005-09-14 Anthony Green <[EMAIL PROTECTED]> * java/net/URLStreamHandler.java: Remove redundant

[cp-patches] Patch: minor ZipFile improvement

2005-09-14 Thread Anthony Green
Another patch to an unlikely problem. This just makes sure we've actually read all 4 bytes of the magic word. It also quiets FindBugs which was complaining about how we were ignoring the read result. Ok? AG 2005-09-14 Anthony Green <[EMAIL PROTECTED]> * java/util/zip/ZipFile.java

[cp-patches] Patch: throw IOExceptions on closed PushbackInputStream operations

2005-09-14 Thread Anthony Green
If you try an operation on a closed PushbackInputStream, you'll probably get a NullPointerException. This patch turns them into IOExceptions with an appropriate message. I think this is a better response based on the spec (any error should throw an IOException). OK? AG 2005-09-14 Anthony Gr

[cp-patches] Patch: improve error handling in String

2005-09-14 Thread Anthony Green
If we get to an impossible situation, then we should throw an Error instead of silently trying to continue. This also quiets FindBugs, which says this method should never return null. Ok? AG 2005-09-14 Anthony Green <[EMAIL PROTECTED]> * java/lang/String.java (getBytes): Throw an E

[cp-patches] Patch: compute aspect ratios with fp division

2005-09-14 Thread Anthony Green
Another integer division problem. OK? AG 2005-09-14 Anthony Green <[EMAIL PROTECTED]> * javax/imageio/ImageReader.java (getAspectRatio): Don't use integer division when computing aspect ratio. Index: javax/imageio/ImageReader.java ==

[cp-patches] Patch: compare strings with equals()

2005-09-14 Thread Anthony Green
'==' on Strings only works when we expect the strings to be interned, which isn't the case here. Ok? AG 2005-09-14 Anthony Green <[EMAIL PROTECTED]> * java/security/Identity.java (equals, identityEquals): Don't use `==' to compare uninterned Strings. Use String.equals(). I

[cp-patches] Patch: fix || expressions in jdwp code

2005-09-14 Thread Anthony Green
These | operators should have been ||. Ok? AG 2005-09-14 Anthony Green <[EMAIL PROTECTED]> * gnu/classpath/jdwp/event/filters/StepFilter.java (StepFilter): Short circuit this conditional. * gnu/classpath/jdwp/event/filters/ThreadOnlyFilter.java (ThreadOnlyFil

[cp-patches] Patch: replace NullPointerException with ClassCastException

2005-09-14 Thread Anthony Green
This doesn't really fix a bug. FindBugs was complaining about a potential null dereference. This patch essentially turns a potential NullPointerException into a ClassCastException, which is no worse - and quiets FindBugs on this issue. Ok? AG 2005-09-14 Anthony Green <[EMAIL PROTECTED]>

[cp-patches] Patch: close charset provider readers

2005-09-14 Thread Anthony Green
We should close each reader we open. Ok? 2005-09-14 Anthony Green <[EMAIL PROTECTED]> * java/nio/charset/Charset.java (providers2): close() each reader we open. Index: java/nio/charset/Charset.java === RCS file

[cp-patches] Patch: don't use integer division in color calculation

2005-09-14 Thread Anthony Green
There are really two patches here. The first is an integer division problem. I think the intent was really to perform floating point divition when computing saturation. The second just adds some clarifying comments for the next person who looks at this code with FindBugs. 2005-09-14 Anthony G

[cp-patches] Patch: Class.pd is transient

2005-09-14 Thread Anthony Green
FindBugs is complaining that Class.pd will mess up serialization. I don't know if this is the best fix. Comments? AG 2005-09-14 Anthony Green <[EMAIL PROTECTED]> * java/lang/Class.java (pd): ProtectionDomain is not serializable. Make this field transient. Index: java/lang

Re: [cp-patches] Patch: convert new Boolean(X) to Boolean.valueOf(X)

2005-09-14 Thread Archie Cobbs
David Daney wrote: Archie Cobbs wrote: Mark Wielaard wrote: While messing around with FindBugs, I came up with the following useful patch. It converts all "new Boolean(X)" instances to "Boolean.valueOf(X)". Ok? [...] - return new Boolean(true); + return Boolean.valueOf(true); OK,

Re: [cp-patches] patch for approval fixes bug #23006

2005-09-14 Thread Roman Kennke
Am Mittwoch, den 14.09.2005, 13:17 -0400 schrieb Anthony Balkissoon: > This patch was inappropriate. The appropriate changes should be made in > JTextArea. I've attached the new patch and will check it in and the > Mauve test case. > > 2005-09-14 Anthony Balkissoon <[EMAIL PROTECTED]> > >

[cp-patches] FYI: DefaultStyledDocument fixlet

2005-09-14 Thread Roman Kennke
One more fixlet to DefaultStyledDocument. This lets me startup BeanShell: http://kennke.org/~roman/bsh.png Still needed a little tweak on BeanShells side though. Seems a little issue in java.io. Will file a bug report for this. 2005-09-14 Roman Kennke <[EMAIL PROTECTED]> * javax/swing

Re: [cp-patches] DiffieHellman and RSA

2005-09-14 Thread Thomas Fitzsimmons
On Tue, 2005-09-13 at 15:10 -0700, Casey Marshall wrote: > I've checked these in. I put an RFC for these out some time ago [1], > but didn't see Tromey's reply until now. > > This adds DiffieHellman key exchange and RSA cipher support; as I > understand it, this should fix problems with using

[cp-patches] FYI: ComponentView addition

2005-09-14 Thread Anthony Balkissoon
Implemented createComponent. Attached. 2005-09-14 Anthony Balkissoon <[EMAIL PROTECTED]> * javax/swing/text/ComponentView.java: (createComponent): Implemented. --Tony Index: javax/swing/text/ComponentView.java ===

Re: [cp-patches] Patch: convert new Boolean(X) to Boolean.valueOf(X)

2005-09-14 Thread David Daney
Archie Cobbs wrote: Mark Wielaard wrote: While messing around with FindBugs, I came up with the following useful patch. It converts all "new Boolean(X)" instances to "Boolean.valueOf(X)". Ok? [...] - return new Boolean(true); + return Boolean.valueOf(true); OK, but if you know th

[cp-patches] FYI: More javax.swing.text stuff

2005-09-14 Thread Roman Kennke
Hi, I hacked a little more on javax.swing.text. This patch makes it possible to actually insert content into a styled text component using the keyboard. Yay! 2005-09-14 Roman Kennke <[EMAIL PROTECTED]> * javax/swing/text/DefaultStyledDocument.java (insertUpdate): Tweaked attrib

[cp-patches] FYI: Making hashCode consistent with equals in gnu.CORBA

2005-09-14 Thread Meskauskas Audrius
2005-09-14Audrius Meskauskas <[EMAIL PROTECTED]> * gnu/CORBA/Connected_objects.java (equals), * gnu/CORBA/Poa/activeObjectMap.java (equals): Removed. * gnu/CORBA/Version.java (hashCode), * gnu/CORBA/gnuAny.java (hashCode): New method. Index: gnu/CORBA/Connected_o

Re: [cp-patches] Patch: convert new Boolean(X) to Boolean.valueOf(X)

2005-09-14 Thread Archie Cobbs
Mark Wielaard wrote: While messing around with FindBugs, I came up with the following useful patch. It converts all "new Boolean(X)" instances to "Boolean.valueOf(X)". Ok? [...] - return new Boolean(true); + return Boolean.valueOf(true); OK, but if you know the actual value then usi

[cp-patches]: Patch: JProgressBar Fix

2005-09-14 Thread Lillian Angel
2005-09-14 Lillian Angel <[EMAIL PROTECTED]> * javax/swing/JProgressBar.java (JProgressBar): Fixed to use setOrientation function. * javax/swing/plaf/metal/MetalProgressBarUI.java (createUI): Was using the same instance of the UI for each new JProgressBar.

[cp-patches] FYI: Hashcode for NameComponent.

2005-09-14 Thread Meskauskas Audrius
This is a hashcode function for the NameComponent, computed using Adler by content rather than by identity (same as .equals works). 2005-09-14Audrius Meskauskas <[EMAIL PROTECTED]> * org/omg/CosNaming/NameComponent (hashCode): New method. Index: org/omg/CosNaming/NameComponent.java =

[cp-patches]: Patch: MetalTreeUI implementation, BasicTreeUI implementation updated.

2005-09-14 Thread Lillian Angel
2005-09-14 Lillian Angel <[EMAIL PROTECTED]> Fixes Bug #23795 * javax/swing/plaf/basic/BasicTreeUI.java: Made private fields package private. (setCellRenderer): Took out code that updateRenderer takes care of. (getPathBounds): Fixed to use treeMode

Re: [cp-patches] patch for approval fixes bug #23006

2005-09-14 Thread Anthony Balkissoon
This patch was inappropriate. The appropriate changes should be made in JTextArea. I've attached the new patch and will check it in and the Mauve test case. 2005-09-14 Anthony Balkissoon <[EMAIL PROTECTED]> * javax/swing/JTextArea.java: (append): After non-empty append, invali

Re: [cp-patches] Patch: fix logical operation in ValidationConsumer

2005-09-14 Thread Tom Tromey
> "Anthony" == Anthony Green <[EMAIL PROTECTED]> writes: Anthony> FindBugs pointed out this suspicious constant logical expression. My Anthony> patch assumes this "|" should be "&". Ok? I'm not familiar with this code but I don't see how this could be anything else. Please check it in. To

Re: [cp-patches] FYI: GlyphView additions

2005-09-14 Thread Mark Wielaard
Hi Roman, On Wed, 2005-09-14 at 01:19 +0200, Roman Kennke wrote: > This (together with the next view commits) basically enabled this: > http://kennke.org/~roman/styletext.png That looks cool! Feel free to add something like that to GNU Classpath Examples :) > (getBreakWeight): New method

[cp-patches] Patch: FYI: Character javadoc fixes

2005-09-14 Thread Tom Tromey
I'm checking this in. This fixes a couple minor problems in the Character javadoc. Tom Index: ChangeLog from Tom Tromey <[EMAIL PROTECTED]> * java/lang/Character.java: Typo fixes in javadoc. Index: java/lang/Character.java =

[cp-patches] Patch: FYI: StringBuffer -vs- 1.5

2005-09-14 Thread Tom Tromey
I'm checking this in (on the trunk). This adds the new 1.5 methods to StringBuffer. Tom Index: ChangeLog from Tom Tromey <[EMAIL PROTECTED]> * java/lang/StringBuffer.java (StringBuffer): New constructor. (trimToSize): New method. (codePointAt): Likewise. (codePo

[cp-patches] FYI: reformatted BasicTabbedPaneUI

2005-09-14 Thread Roman Kennke
2005-09-14 Roman Kennke <[EMAIL PROTECTED]> * javax/swing/plaf/basic/BasicTabbedPaneUI.java: Reformatted file. /Roman ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches

Re: [cp-patches] jcl.c 64-bit fix

2005-09-14 Thread Tom Tromey
> "Twisti" == Christian Thalinger <[EMAIL PROTECTED]> writes: Twisti> 2005-09-14 Christian Thalinger <[EMAIL PROTECTED]> Twisti> * native/jni/classpath/jcl.c: Replaced undefined Twisti> POINTERS_ARE_64BIT with SIZEOF_VOID_P == 8. I'm checking this in. Tom

Re: [cp-patches] Patch: remove stray semicolon

2005-09-14 Thread Tom Tromey
> "Anthony" == Anthony Green <[EMAIL PROTECTED]> writes: Anthony> 2005-09-13 Anthony Green <[EMAIL PROTECTED]> Anthony>* gnu/java/security/der/DERReader.java: Remove stray semicolon. Yes, thanks. IMO this kind of thing doesn't require approval. Tom __

[cp-patches] FYI: MetalIconFactory.PaletteCloseIcon

2005-09-14 Thread David Gilbert
This icon class should implement UIResource (as reported by japi), so I fixed it with this patch: 2005-09-14 David Gilbert <[EMAIL PROTECTED]> * javax/swing/plaf/metal/MetalIconFactory.java (PaletteCloseIcon): now implements UIResource. Regards, Dave Gilbert Index: javax/swi

[cp-patches] jcl.c 64-bit fix

2005-09-14 Thread Christian Thalinger
Hi! Yesterday, after a long debugging session with fitzsim, i've found this bug. TWISTI 2005-09-14 Christian Thalinger <[EMAIL PROTECTED]> * native/jni/classpath/jcl.c: Replaced undefined POINTERS_ARE_64BIT with SIZEOF_VOID_P == 8. Index: native/jni/classpath/jcl.c ==

[cp-patches] FYI: Added API comments to javax.swing.ButtonModel

2005-09-14 Thread Roman Kennke
2005-09-14 Roman Kennke <[EMAIL PROTECTED]> * javax/swing/ButtonModel.java: Added API docs all over. /Roman Index: javax/swing/ButtonModel.java === RCS file: /cvsroot/classpath/classpath/javax/swing/ButtonModel.java,v retri

Re: [cp-patches] Patch: convert new Boolean(X) to Boolean.valueOf(X)

2005-09-14 Thread Mark Wielaard
On Wed, 2005-09-14 at 00:14 -0700, Anthony Green wrote: > While messing around with FindBugs, I came up with the following useful > patch. It converts all "new Boolean(X)" instances to > "Boolean.valueOf(X)". Ok? > [...] > - return new Boolean(true); > + return Boolean.valueOf(true); O

[cp-patches] FYI: Clarified API docs for JTabbedPane

2005-09-14 Thread Roman Kennke
I clarified the API docs for JTabbedPane a bit to account for my previous commit. 2005-09-14 Roman Kennke <[EMAIL PROTECTED]> * javax/swing/JTabbedPane.java: Added API comments to make clear that null values for tab titles are allowed. /Roman Index: javax/swing/JTabbedPane.java

[cp-patches] FYI: Fixed JTabbedPane bug

2005-09-14 Thread Roman Kennke
The specs say that the JTabbedPane.addTab() methods must accept null Strings for titles. However, doing this lead to an assertion failure or segfault in font metrics calculations as reported in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23859 This is fixed by this patch. 2005-09-14 Roman Kennke

Re: [cp-patches] FYI: API doc fixes in org.omg.CORBA:Surely, why to keep them sitting?

2005-09-14 Thread Meskauskas Audrius
Surely. Why to keep them sitting? The doc fixes are great! Regards. Audrius. David Gilbert wrote: I've had these (minor) API doc fixes sitting on my hard drive for a while and figured I might as well commit them: 2005-09-14 David Gilbert <[EMAIL PROTECTED]> * org/omg/CORBA/ORB.java:

[cp-patches] FYI: API doc fixes in gnu.CORBA.*

2005-09-14 Thread David Gilbert
Just cleaning up some small fixes that were sitting in my workspace - the following is committed: 2005-09-14 David Gilbert <[EMAIL PROTECTED]> * gnu/CORBA/ExceptionCreator.java: minor API doc fixes, * gnu/CORBA/Version.java: likewise. Regards, Dave Gilbert Index: gnu/CORBA/E

[cp-patches] FYI: API doc fixes in org.omg.CORBA

2005-09-14 Thread David Gilbert
I've had these (minor) API doc fixes sitting on my hard drive for a while and figured I might as well commit them: 2005-09-14 David Gilbert <[EMAIL PROTECTED]> * org/omg/CORBA/ORB.java: minor API doc fixes, * org/omg/CORBA/PERSIST_STORE.java: likewise, * org/omg/CORBA/

[cp-patches] FYI: Basic look and feel - getPropertyPrefix() API docs

2005-09-14 Thread David Gilbert
I committed this patch (just API doc additions): 2005-09-14 David Gilbert <[EMAIL PROTECTED]> * javax/swing/plaf/basic/BasicFormattedTextFieldUI.java: (getPropertyPrefix): added API docs, * javax/swing/plaf/basic/BasicPasswordFieldUI.java: (getPropertyPrefix): a

[cp-patches] FYI: MetalComboBoxIcon

2005-09-14 Thread David Gilbert
I committed this small change to update the icon color depending on the component state: 2005-09-14 David Gilbert <[EMAIL PROTECTED]> * javax/swing/plaf/metal/MetalComboBoxIcon.java: fixed header, (paintIcon): change color to reflect component state. Regards, Dave Index: jav

[cp-patches] Patch: fix logical operation in ValidationConsumer

2005-09-14 Thread Anthony Green
FindBugs pointed out this suspicious constant logical expression. My patch assumes this "|" should be "&". Ok? AG 2005-09-13 Anthony Green <[EMAIL PROTECTED]> * gnu/xml/pipeline/ValidationConsumer.java: Fix flags test (was constant expression). Index: gnu/xml/pipeline/ValidationConsume

[cp-patches] Patch: add missing switch break?

2005-09-14 Thread Anthony Green
>From reading this code, I don't think we really want to fall-through on this switch case. OK? AG 2005-09-13 Anthony Green <[EMAIL PROTECTED]> * gnu/xml/aelfred2/XmlParser.java: Add missing break;. Index: gnu/xml/aelfred2/XmlParser.java =

[cp-patches] Patch: remove stray semicolon

2005-09-14 Thread Anthony Green
FindBugs and I think we have a stray semicolon that needs removing. Ok? AG 2005-09-13 Anthony Green <[EMAIL PROTECTED]> * gnu/java/security/der/DERReader.java: Remove stray semicolon. Index: gnu/java/security/der/DERReader.java =

[cp-patches] Patch: convert new Boolean(X) to Boolean.valueOf(X)

2005-09-14 Thread Anthony Green
While messing around with FindBugs, I came up with the following useful patch. It converts all "new Boolean(X)" instances to "Boolean.valueOf(X)". Ok? AG h 2005-09-13 Anthony Green <[EMAIL PROTECTED]> * javax/swing/plaf/basic/BasicFileChooserUI.java, javax/swing/filechooser/FileSystemView.