[cp-patches] FYI: Was: gnu_java_awt_peer_gtk_GdkFontPeer.c (initStaticState): missing NewGlobalRef?
Hi! As discussed on classpath, this one is commited. Maybe more to come... TWISTI 2005-11-09 Christian Thalinger [EMAIL PROTECTED] * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c (initStaticState): Register global variable glyphVector_class as global reference. Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c,v retrieving revision 1.10 diff -u -3 -p -r1.10 gnu_java_awt_peer_gtk_GdkFontPeer.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c 19 Sep 2005 05:47:09 - 1.10 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c 9 Nov 2005 09:57:14 - @@ -65,6 +65,9 @@ Java_gnu_java_awt_peer_gtk_GdkFontPeer_i glyphVector_class = (*env)-FindClass (env, gnu/java/awt/peer/gtk/GdkGlyphVector); + glyphVector_class = (*env)-NewGlobalRef +(env, glyphVector_class); + glyphVector_ctor = (*env)-GetMethodID (env, glyphVector_class, init, ([D[ILjava/awt/Font;Ljava/awt/font/FontRenderContext;)V); ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: BasicTextUI fixlet
I committed this little fixlet for the BasicTextUI. This should solve the problem with textfields where the text is slightly off when displaying right-aligned. 2005-11-09 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTextUI.java (getVisibleEditorRect): Correctly calculate the inner rectangle. /Roman Index: javax/swing/plaf/basic/BasicTextUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTextUI.java,v retrieving revision 1.52 diff -u -r1.52 BasicTextUI.java --- javax/swing/plaf/basic/BasicTextUI.java 8 Nov 2005 15:03:11 - 1.52 +++ javax/swing/plaf/basic/BasicTextUI.java 9 Nov 2005 10:19:42 - @@ -831,10 +831,10 @@ { Caret caret = textComponent.getCaret(); Highlighter highlighter = textComponent.getHighlighter(); - + if (textComponent.isOpaque()) paintBackground(g); - + if (highlighter != null textComponent.getSelectionStart() != textComponent.getSelectionEnd()) highlighter.paint(g); @@ -1064,8 +1064,8 @@ Insets insets = textComponent.getInsets(); return new Rectangle(insets.left, insets.top, - width - insets.left + insets.right, - height - insets.top + insets.bottom); + width - insets.left - insets.right, + height - insets.top - insets.bottom); } /** ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] FYI: BasicTextUI fixlet
Oddly, this seems to also have fixed a problem with the vertical alignment of text in editable JComboBoxes under the MetalLookAndFeel. I'm very happy about that... Regards, Dave Roman Kennke wrote: I committed this little fixlet for the BasicTextUI. This should solve the problem with textfields where the text is slightly off when displaying right-aligned. 2005-11-09 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTextUI.java (getVisibleEditorRect): Correctly calculate the inner rectangle. /Roman Index: javax/swing/plaf/basic/BasicTextUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTextUI.java,v retrieving revision 1.52 diff -u -r1.52 BasicTextUI.java --- javax/swing/plaf/basic/BasicTextUI.java 8 Nov 2005 15:03:11 - 1.52 +++ javax/swing/plaf/basic/BasicTextUI.java 9 Nov 2005 10:19:42 - @@ -831,10 +831,10 @@ { Caret caret = textComponent.getCaret(); Highlighter highlighter = textComponent.getHighlighter(); - + if (textComponent.isOpaque()) paintBackground(g); - + if (highlighter != null textComponent.getSelectionStart() != textComponent.getSelectionEnd()) highlighter.paint(g); @@ -1064,8 +1064,8 @@ Insets insets = textComponent.getInsets(); return new Rectangle(insets.left, insets.top, -width - insets.left + insets.right, -height - insets.top + insets.bottom); +width - insets.left - insets.right, +height - insets.top - insets.bottom); } /** ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] FYI: BasicTextUI fixlet
I looked more closely at the patch, and it's not so odd that this problem is fixed. Thanks Roman! Regards, Dave David Gilbert wrote: Oddly, this seems to also have fixed a problem with the vertical alignment of text in editable JComboBoxes under the MetalLookAndFeel. I'm very happy about that... Regards, Dave Roman Kennke wrote: I committed this little fixlet for the BasicTextUI. This should solve the problem with textfields where the text is slightly off when displaying right-aligned. 2005-11-09 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTextUI.java (getVisibleEditorRect): Correctly calculate the inner rectangle. /Roman Index: javax/swing/plaf/basic/BasicTextUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTextUI.java,v retrieving revision 1.52 diff -u -r1.52 BasicTextUI.java --- javax/swing/plaf/basic/BasicTextUI.java8 Nov 2005 15:03:11 -1.52 +++ javax/swing/plaf/basic/BasicTextUI.java9 Nov 2005 10:19:42 - @@ -831,10 +831,10 @@ { Caret caret = textComponent.getCaret(); Highlighter highlighter = textComponent.getHighlighter(); -+ if (textComponent.isOpaque()) paintBackground(g); -+ if (highlighter != null textComponent.getSelectionStart() != textComponent.getSelectionEnd()) highlighter.paint(g); @@ -1064,8 +1064,8 @@ Insets insets = textComponent.getInsets(); return new Rectangle(insets.left, insets.top, - width - insets.left + insets.right, - height - insets.top + insets.bottom); + width - insets.left - insets.right, + height - insets.top - insets.bottom); } /** ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: JComponent fixlet
I committed the attached fix that moves the getComponentGraphics() fetch from paintComponent() to paint(). Some simple tests show that this is the right thing and it also fixes a problem with an app I have here. 2005-11-09 Roman Kennke [EMAIL PROTECTED] * javax/swing/JComponent.java (paint): Fetch a new componentGraphics here instead of paintComponent. (paintComponent): Don't fetch the componentGraphics here. This must be done in paint. /Roman Index: javax/swing/JComponent.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JComponent.java,v retrieving revision 1.77 diff -u -r1.77 JComponent.java --- javax/swing/JComponent.java 8 Nov 2005 13:53:59 - 1.77 +++ javax/swing/JComponent.java 9 Nov 2005 14:41:55 - @@ -1685,10 +1685,11 @@ { if (g.getClip() == null) g.setClip(0, 0, getWidth(), getHeight()); -paintComponent(g); -paintBorder(g); -paintChildren(g); -Rectangle clip = g.getClipBounds(); +Graphics g2 = getComponentGraphics(g); +paintComponent(g2); +paintBorder(g2); +paintChildren(g2); +Rectangle clip = g2.getClipBounds(); if (clip.x == 0 clip.y == 0 clip.width == getWidth() clip.height == getHeight()) RepaintManager.currentManager(this).markCompletelyClean(this); @@ -1785,7 +1786,7 @@ Graphics g2 = g; if (!(g instanceof Graphics2D)) g2 = g.create(); -ui.update(getComponentGraphics(g2), this); +ui.update(g2, this); if (!(g instanceof Graphics2D)) g2.dispose(); } ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: ObjectReferenceFactory API fix.
2005-11-09 Audrius Meskauskas [EMAIL PROTECTED] * org/omg/PortableInterceptor/ObjectReferenceFactory.java: Do not inherit from org.omg.CORBA.Object Index: org/omg/PortableInterceptor/ObjectReferenceFactory.java === RCS file: /cvsroot/classpath/classpath/org/omg/PortableInterceptor/ObjectReferenceFactory.java,v retrieving revision 1.1 diff -u -r1.1 ObjectReferenceFactory.java --- org/omg/PortableInterceptor/ObjectReferenceFactory.java 26 Oct 2005 20:57:54 - 1.1 +++ org/omg/PortableInterceptor/ObjectReferenceFactory.java 9 Nov 2005 15:37:12 - @@ -52,6 +52,6 @@ * @author Audrius Meskauskas, Lithuania ([EMAIL PROTECTED]) */ public interface ObjectReferenceFactory - extends ObjectReferenceFactoryOperations, IDLEntity, org.omg.CORBA.Object + extends ObjectReferenceFactoryOperations, IDLEntity { } ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] Patch: implemented InvocationEvent.getThrowable
Tony == Anthony Balkissoon [EMAIL PROTECTED] writes: Tony Ack, okay I'll put it back. For future reference, how do I know Tony when a field is or isn't required for serialization? The simplest way is to look at the online javadoc. There is a serialized form link which shows how the object looks in a serialized stream. Tom ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] Patch: implemented InvocationEvent.getThrowable
Hi there, Am Mittwoch, den 09.11.2005, 10:40 -0500 schrieb Anthony Balkissoon: On Tue, 2005-11-08 at 18:30 -0700, Tom Tromey wrote: Tony == Anthony Balkissoon [EMAIL PROTECTED] writes: Tony Thanks for the advice Mark, I fixed this up and committed it. Tony 2005-11-08 Anthony Balkissoon [EMAIL PROTECTED] Tony * java/awt/event/InvocationEvent.java: Tony (exception): Removed unnecessary field. Actually, this field is still required for serialization. Tom Ack, okay I'll put it back. For future reference, how do I know when a field is or isn't required for serialization? In the API docs there is (for some classes like this) a page 'Serialized form' that describes which fields are serialized. The link is below the class description in the See also: field. /Roman signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: FileChooserDemo
I added a demo for the JFileChooser component, and integrated this into the gnu.classpath.examples.swing.Demo class. I also made a change to the latter class so that the buttons at the bottom appear in two rows now, so that the demo frame isn't so wide: 2005-11-09 David Gilbert [EMAIL PROTECTED] * examples/gnu/classpath/examples/swing/Demo.java (mkMenuBar): added file chooser item, (mkButtonBar): split buttons into two rows, added 'FileChooser' button, * examples/gnu/classpath/examples/swing/FileChooserDemo.java: New file. Regards, Dave Index: examples/gnu/classpath/examples/swing/Demo.java === RCS file: /cvsroot/classpath/classpath/examples/gnu/classpath/examples/swing/Demo.java,v retrieving revision 1.27 diff -u -r1.27 Demo.java --- examples/gnu/classpath/examples/swing/Demo.java 4 Nov 2005 12:23:13 - 1.27 +++ examples/gnu/classpath/examples/swing/Demo.java 9 Nov 2005 16:20:36 - @@ -211,6 +211,10 @@ (new TextFieldDemo(TextField Demo)).createContent(), examples); +new PopUpAction(FileChooser, +(new FileChooserDemo(FileChooser Demo)).createContent(), +examples); + new PopUpAction(ColorChooser, mkColorChooser(), examples); @@ -1018,28 +1022,29 @@ private JPanel mkButtonBar() { -JPanel panel = new JPanel (); -panel.setLayout(new FlowLayout()); +JPanel panel = new JPanel (new GridLayout(2, 1)); +JPanel panelA = new JPanel(new FlowLayout()); +JPanel panelB = new JPanel(new FlowLayout()); new PopUpAction(Buttons, (new ButtonDemo(Button Demo)).createContent(), - panel); + panelA); new PopUpAction(Toggles, mkToggle(cool and refreshing), - panel); + panelA); new PopUpAction(Checkbox, mkCheckbox(ice cold), - panel); + panelA); new PopUpAction(Radio, mkRadio(delicious), - panel); + panelA); new PopUpAction(Slider, (new SliderDemo(Slider Demo)).createContent(), - panel); + panelA); new PopUpAction(List, mkListPanel(new String[] { hello, @@ -1050,56 +1055,60 @@ that, wraps, over}), - panel); + panelA); new PopUpAction(Scrollbar, (new ScrollBarDemo(ScrollBar Demo)).createContent(), - panel); + panelA); new PopUpAction(Viewport, mkViewportBox(mkBigButton(View Me!)), - panel); + panelA); new PopUpAction(ScrollPane, mkScrollPane(mkBigButton(Scroll Me!)), - panel); + panelA); new PopUpAction(TabPane, mkTabs(new String[] {happy, sad, indifferent}), - panel); + panelB); new PopUpAction(Spinner, mkSpinner(), - panel); + panelB); new PopUpAction(TextField, (new TextFieldDemo(TextField Demo)).createContent(), - panel); + panelB); + +new PopUpAction(FileChooser, +(new FileChooserDemo(FileChooser Demo)).createContent(), +panelB); new PopUpAction(ColorChooser, mkColorChooser(), - panel); + panelB); new PopUpAction(ComboBox, (new ComboBoxDemo(ComboBox Demo)).createContent(), - panel); + panelB); new PopUpAction(Editor, mkEditorPane(), -panel); +panelB); new PopUpAction(Tree, mkTree(), -panel); +panelB); new PopUpAction(Table, mkTable(), -panel); +panelB); JButton exitDisposer = mkDisposerButton(frame); -panel.add(exitDisposer); +panelB.add(exitDisposer); exitDisposer.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1107,6 +1116,8 @@ System.exit(1); } }); +panel.add(panelA); +panel.add(panelB); return panel; } } Index: examples/gnu/classpath/examples/swing/FileChooserDemo.java
[cp-patches] Patch: JTabbedPane fix
Made this fix because there were several problems when the layout mode was set to SCROLLING. There are still some problems I am working on. 2005-11-09 Lillian Angel [EMAIL PROTECTED] * javax/swing/JTabbedPane.java (setComponent): Added check to prevent infinite loops. * javax/swing/plaf/metal/MetalTabbedPaneUI.java (createLayoutManager): Should call super here, so the layout is set properly depending on the layout mode. Index: javax/swing/JTabbedPane.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JTabbedPane.java,v retrieving revision 1.22 diff -u -r1.22 JTabbedPane.java --- javax/swing/JTabbedPane.java 19 Oct 2005 15:45:04 - 1.22 +++ javax/swing/JTabbedPane.java 9 Nov 2005 16:48:30 - @@ -337,9 +337,12 @@ */ public void setComponent(Component c) { + if (c != null) +{ remove(component); this.component = c; add(c); +} } /** Index: javax/swing/plaf/metal/MetalTabbedPaneUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalTabbedPaneUI.java,v retrieving revision 1.9 diff -u -r1.9 MetalTabbedPaneUI.java --- javax/swing/plaf/metal/MetalTabbedPaneUI.java 27 Oct 2005 09:50:58 - 1.9 +++ javax/swing/plaf/metal/MetalTabbedPaneUI.java 9 Nov 2005 16:48:30 - @@ -127,7 +127,7 @@ */ protected LayoutManager createLayoutManager() { -return new TabbedPaneLayout(); +return super.createLayoutManager(); } /** ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: New 1.5 CORBA classes.
2005-11-09 Audrius Meskauskas [EMAIL PROTECTED] * org/omg/PortableInterceptor/ObjectReferenceTemplate.java, * org/omg/PortableInterceptor/ObjectReferenceTemplateHelper.java, * org/omg/PortableInterceptor/ObjectReferenceTemplateHolder.java: New files. ObjectReferenceTemplate.tar.gz Description: GNU Zip compressed data ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: Two more CORBA classes
2005-11-09 Audrius Meskauskas [EMAIL PROTECTED] * org/omg/PortableInterceptor/ObjectReferenceTemplateSeqHelper.java, * org/omg/PortableInterceptor/ObjectReferenceTemplateSeqHolder.java: New files. /* ObjectReferenceTemplateSeqHolder.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package org.omg.PortableInterceptor; import org.omg.CORBA.portable.Streamable; import org.omg.CORBA.portable.InputStream; import org.omg.CORBA.portable.OutputStream; /** * A holder for the array of [EMAIL PROTECTED] ObjectReferenceTemplate}s. * * @author Audrius Meskauskas, Lithuania ([EMAIL PROTECTED]) */ public class ObjectReferenceTemplateSeqHolder implements Streamable { /** * The stored ObjectReferenceTemplate value. */ public ObjectReferenceTemplate[] value; /** * Create the unitialised instance, leaving the value field with default * codenull/code value. */ public ObjectReferenceTemplateSeqHolder() { } /** * Create the initialised instance. * * @param initialValue the value that will be assigned to the * codevalue/code field. */ public ObjectReferenceTemplateSeqHolder(ObjectReferenceTemplate[] initialValue) { value = initialValue; } /** * Fill in the [EMAIL PROTECTED] value} by data from the CDR stream. * * @param input the org.omg.CORBA.portable stream to read. */ public void _read(InputStream input) { value = ObjectReferenceTemplateSeqHelper.read(input); } /** * Write the stored value into the CDR stream. * * @param output the org.omg.CORBA.portable stream to write. */ public void _write(OutputStream output) { ObjectReferenceTemplateSeqHelper.write(output, value); } /** * Get the typecode of the ObjectReferenceTemplate. */ public org.omg.CORBA.TypeCode _type() { return ObjectReferenceTemplateSeqHelper.type(); } } /* ObjectReferenceTemplateSeqHelper.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module.
[cp-patches] Patch: ComponentInputMaps implemented
This patch fixes all the FIXME notes in ComponentInputMap and tidies a few places in JComponent relating to ComponentInputMap. The main method however, JComponent.udpateComponentInputMap is not fully implemented because I first have to write a KeyboardManager class, which I'll do now. 2005-11-09 Anthony Balkissoon [EMAIL PROTECTED] * javax/swing/ComponentInputMap.java: (put): Notify the component. (clear): Likewise. (remove): Likewise. (setParent): Notify the parent. Improved the exception messages. * javax/swing/JComponent.java: (inputMap_whenInFocusedWindow): Changed type from InputMap to ComponentInputMap. (setInputMap): If we're setting the WHEN_IN_FOCUSED_WINDOW map and the parameter is not a ComponentInputMap or is not associated with the same Component, throw an IllegalArgumentException. (getInputMap): Create a new ComponentInputMap instead of a new InputMap when the WHEN_IN_FOCUSED_WINDOW map doesn't yet exist. (udpateComponentInputMap): New method. This is the method that ComponentInputMap calls when it is updated. Not yet completely implemented. --Tony Index: javax/swing/ComponentInputMap.java === RCS file: /cvsroot/classpath/classpath/javax/swing/ComponentInputMap.java,v retrieving revision 1.8 diff -u -r1.8 ComponentInputMap.java --- javax/swing/ComponentInputMap.java 26 Jul 2005 15:30:54 - 1.8 +++ javax/swing/ComponentInputMap.java 9 Nov 2005 19:07:40 - @@ -78,7 +78,8 @@ public void put(KeyStroke keystroke, Object value) { super.put(keystroke, value); -// FIXME: Notify component. +if (component != null) + component.updateComponentInputMap(this); } /** @@ -87,7 +88,8 @@ public void clear() { super.clear(); -// FIXME: Notify component. +if (component != null) + component.updateComponentInputMap(this); } /** @@ -98,7 +100,8 @@ public void remove(KeyStroke keystroke) { super.remove(keystroke); -// FIXME: Notify component. +if (component != null) + component.updateComponentInputMap(this); } /** @@ -111,14 +114,19 @@ */ public void setParent(InputMap parentMap) { -if (! (parentMap instanceof ComponentInputMap)) - throw new IllegalArgumentException(); - -if (((ComponentInputMap) parentMap).getComponent() != component) - throw new IllegalArgumentException(); +if (parentMap != null !(parentMap instanceof ComponentInputMap)) + throw new IllegalArgumentException(ComponentInputMaps can only have + + ComponentInputMaps for parents); + +if (parentMap != null +((ComponentInputMap) parentMap).getComponent() != component) + throw new +IllegalArgumentException(ComponentInputMaps' parents must + + be associated with the same JComponents); super.setParent(parentMap); -// FIXME: Notify component. +if (component != null) + component.updateComponentInputMap(this); } /** Index: javax/swing/JComponent.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JComponent.java,v retrieving revision 1.78 diff -u -r1.78 JComponent.java --- javax/swing/JComponent.java 9 Nov 2005 14:44:00 - 1.78 +++ javax/swing/JComponent.java 9 Nov 2005 19:07:41 - @@ -546,7 +546,7 @@ private InputMap inputMap_whenFocused; private InputMap inputMap_whenAncestorOfFocused; - private InputMap inputMap_whenInFocusedWindow; + private ComponentInputMap inputMap_whenInFocusedWindow; private ActionMap actionMap; /** @since 1.3 */ private boolean verifyInputWhenFocusTarget; @@ -2022,7 +2022,11 @@ break; case WHEN_IN_FOCUSED_WINDOW: -inputMap_whenInFocusedWindow = map; +if (map != null !(map instanceof ComponentInputMap)) +throw new + IllegalArgumentException(WHEN_IN_FOCUSED_WINDOW + + InputMap must be a ComponentInputMap); +inputMap_whenInFocusedWindow = (ComponentInputMap)map; break; case UNDEFINED_CONDITION: @@ -2048,7 +2052,7 @@ case WHEN_IN_FOCUSED_WINDOW: if (inputMap_whenInFocusedWindow == null) - inputMap_whenInFocusedWindow = new InputMap(); + inputMap_whenInFocusedWindow = new ComponentInputMap(this); return inputMap_whenInFocusedWindow; case UNDEFINED_CONDITION: @@ -3297,5 +3301,27 @@ found = p; } return found; + } + + /** + * This is the method that gets called when the WHEN_IN_FOCUSED_WINDOW map + * is changed. + * @param c the JComponent associated with the WHEN_IN_FOCUSED_WINDOW map + */ + void updateComponentInputMap(ComponentInputMap changed)
[cp-patches] Fix for Eclipse-related Ælfred2 bu g
This fixes a problem in the Ælfred2 SAX parser whereby a MalformedURLException was being thrown even though a custom URI resolver was set on the parser instance. Reported by Michael Koch. 2005-11-09 Chris Burdess [EMAIL PROTECTED] * gnu/xml/aelfred2/SAXDriver.java: Ensure that absolutize does not throw exception when custom entity resolver is set. -- 犬 Chris Burdess They that can give up essential liberty to obtain a little safety deserve neither liberty nor safety. - Benjamin Franklin patch Description: Binary data ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: [doc] Add cp-tools gjdoc download link
Hi, It was pointed out that there was no dowload link for cp-tools gjdoc on the website. This fixes that. 2005-11-09 Mark Wielaard [EMAIL PROTECTED] * doc/www.gnu.org/cp-tools/cp-tools.wml: Add gjdoc download link. Committed, Mark diff -u -r1.2 cp-tools.wml --- doc/www.gnu.org/cp-tools/cp-tools.wml 2 Mar 2005 16:15:06 - 1.2 +++ doc/www.gnu.org/cp-tools/cp-tools.wml 9 Nov 2005 20:51:56 - @@ -35,6 +35,15 @@ /box box +boxtitlea name=DevelopmentGNU Classpath::Tools::Downloads/a/boxtitle +boxitem +At the moment there are only official releases of gjdoc on +createlink url=ftp://ftp.gnu.org/gnu/classpath/; name=ftp.gnu.org/. +All other tools are available from CVS from the savannah project page below. +/boxitem +/box + +box boxtitlea name=DevelopmentGNU Classpath::Tools::Development/a/boxtitle boxitem GNU Classpath Tools is part of the GNU Classpath project which is hosted at signature.asc Description: This is a digitally signed message part ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] removing duplicate --enable-xmlj from INSTALL
--enable-xmlj compile native libxml/xslt library default=no This line is twice in INSTALL. The attached patch removes the later one of these. Regards, Petteri Index: INSTALL === RCS file: /cvsroot/classpath/classpath/INSTALL,v retrieving revision 1.33 diff -u -b -B -r1.33 INSTALL --- INSTALL 7 Oct 2005 03:21:02 - 1.33 +++ INSTALL 9 Nov 2005 21:33:13 - @@ -127,7 +127,6 @@ --enable-Werror whether to compile C code with -Werror which turns any compiler warning into a compilation failure default=no - --enable-xmlj compile native libxml/xslt library default=no --with-gjdoc generate documentation using gjdoc default=no --with-jay Regenerate the parsers with jay must be given the path to the jay executable signature.asc Description: OpenPGP digital signature ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] Patch (Suggestions Needed): JComponent key bindings
This patch implements the package-private class javax.swing.KeyboardManager and makes some adjustments in JComponent to allow keybindings registered with the condition WHEN_IN_FOCUSED_WINDOW to work. This mechanism is not 100% correct yet. Attached is a test case that works. Click on the JButton to give it focus. Then pressing 'a' prints I'm Focused to the screen. Clicking on the JCheckBox gives it focus (so the JButton is not focused) and then pressing 'a' prints I'm In Focused Window to the screen == this is new functionality, the JButton can register key bindings that work even when it is not focused or an ancestor of the focused component, it's just in the focused window. However, if, in the testcase, the keybinding is registered before the JButton is added to the JFrame (its top-level ancestor), our implementation fails. This is because when the key action is bound the JButton had no top-level ancestor, and when the JButton was added to the JFrame it doesn't re-hash its bindings. So, I have to find a way to re-hash WHEN_IN_FOCUSED_WINDOW bindings when components are added to containers. Unfortunately, adding occurs in Containers in AWT and much of the needed code is in package-private methods or classes in Swing. For instance, to re-hash bindings I need to use the KeyboardManager class, or at least the method JComponent.updateComponentInputMap. Anyone have any suggestions? 2005-11-09 Anthony Balkissoon [EMAIL PROTECTED] * javax/swing/JComponent.java: (processKeyEvent): Use local variables for boolean pressed and for the KeyStroke. Implemented the code for WHEN_IN_FOCUSED_WINDOW bindings. (updateComponentInputMap): Implemented and fixed typo in docs. * javax/swing/KeyboardManager.java: New class. Index: javax/swing/JComponent.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JComponent.java,v retrieving revision 1.79 diff -u -r1.79 JComponent.java --- javax/swing/JComponent.java 9 Nov 2005 19:15:03 - 1.79 +++ javax/swing/JComponent.java 9 Nov 2005 21:54:20 - @@ -2167,13 +2167,14 @@ // 4. The WHEN_IN_FOCUSED_WINDOW maps of all the enabled components in //the focused window are searched. -if (processKeyBinding(KeyStroke.getKeyStrokeForEvent(e), - e, WHEN_FOCUSED, e.getID() == KeyEvent.KEY_PRESSED)) +KeyStroke keyStroke = KeyStroke.getKeyStrokeForEvent(e); +boolean pressed = e.getID() == KeyEvent.KEY_PRESSED; + +if (processKeyBinding(keyStroke, e, WHEN_FOCUSED, pressed)) // This is step 1 from above comment. e.consume(); -else if (processKeyBinding(KeyStroke.getKeyStrokeForEvent(e), - e, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, - e.getID() == KeyEvent.KEY_PRESSED)) +else if (processKeyBinding + (keyStroke, e, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, pressed)) // This is step 2 from above comment. e.consume(); else @@ -2183,9 +2184,8 @@ while ((current = current.getParent()) instanceof JComponent) { if (((JComponent)current).processKeyBinding -(KeyStroke.getKeyStrokeForEvent(e), e, - WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, - e.getID() == KeyEvent.KEY_PRESSED)) +(keyStroke, e,WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, + pressed)) { e.consume(); break; @@ -2196,10 +2196,10 @@ } if (e.isConsumed()) return; - + // This is step 4 from above comment. -// FIXME: Implement. Note, should use ComponentInputMaps rather -// than walking the entire containment hierarchy. +if (KeyboardManager.getManager().processKeyStroke(this, keyStroke, e)) + e.consume(); } } @@ -3306,7 +3306,7 @@ /** * This is the method that gets called when the WHEN_IN_FOCUSED_WINDOW map * is changed. - * @param c the JComponent associated with the WHEN_IN_FOCUSED_WINDOW map + * @param changed the JComponent associated with the WHEN_IN_FOCUSED_WINDOW map */ void updateComponentInputMap(ComponentInputMap changed) { @@ -3322,6 +3322,12 @@ return; // Now we have to update the keyboard manager's hashtable -// FIXME: not yet implemented +KeyboardManager km = KeyboardManager.getManager(); + +// This is a poor strategy, should be improved. We currently +// delete all the old bindings for the component and then register +// the current bindings. +km.clearBindingsForComp(changed.getComponent()); +km.registerEntireMap((ComponentInputMap) getInputMap(WHEN_IN_FOCUSED_WINDOW)); } } Index: javax/swing/KeyboardManager.java === RCS file:
[cp-patches] FYI: InputStreamReader fixlet
Hi, The jIRCii app passes a CharseetDecoder to InputStreamReader that returns null for charset() (its named NoConversion). This must be catched in the InputStreamReader constructor. 2005-11-09 Roman Kennke [EMAIL PROTECTED] * java/io/InputStreamReader.java (InputStreamReader(InputStream, CharsetDecoder)): Catch the case when the CharsetDecoder returns a null charset and handle it like US-ASCII. /Roman Index: java/io/InputStreamReader.java === RCS file: /cvsroot/classpath/classpath/java/io/InputStreamReader.java,v retrieving revision 1.26 diff -u -r1.26 InputStreamReader.java --- java/io/InputStreamReader.java 13 Sep 2005 21:25:09 - 1.26 +++ java/io/InputStreamReader.java 9 Nov 2005 22:35:38 - @@ -249,8 +249,12 @@ this.in = in; this.decoder = decoder; +Charset charset = decoder.charset(); try { - maxBytesPerChar = decoder.charset().newEncoder().maxBytesPerChar(); + if (charset == null) +maxBytesPerChar = 1f; + else +maxBytesPerChar = charset.newEncoder().maxBytesPerChar(); } catch(UnsupportedOperationException _){ maxBytesPerChar = 1f; } @@ -258,7 +262,10 @@ decoder.onMalformedInput(CodingErrorAction.REPLACE); decoder.onUnmappableCharacter(CodingErrorAction.REPLACE); decoder.reset(); -encoding = EncodingHelper.getOldCanonical(decoder.charset().name()); +if (charset == null) + encoding = US-ASCII; +else + encoding = EncodingHelper.getOldCanonical(decoder.charset().name()); } /** ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] RFC: small PrintWriter improvement
Am Mittwoch, den 26.10.2005, 10:39 +0200 schrieb Roman Kennke: Hi, here comes another fix from Friedjof Siebert that ensures that the field line_separator is not null (in the unlikely but not impossible case that the system property is not set). 2005-10-26 Roman Kennke [EMAIL PROTECTED] Reported by Friedjof Siebert [EMAIL PROTECTED] * java/io/PrintWriter.java (line_separator): Added default value for property to ensure absence of null pointer exception even if property is not set. I also commit this now. 2005-11-09 Roman Kennke [EMAIL PROTECTED] Reported by Friedjof Siebert [EMAIL PROTECTED] * java/io/PrintWriter.java (line_separator): Added default value for property to ensure absence of null pointer exception even if property is not set. /Roman Index: java/io/PrintWriter.java === RCS file: /cvsroot/classpath/classpath/java/io/PrintWriter.java,v retrieving revision 1.19 diff -u -r1.19 PrintWriter.java --- java/io/PrintWriter.java 16 Sep 2005 19:49:04 - 1.19 +++ java/io/PrintWriter.java 9 Nov 2005 22:47:18 - @@ -379,7 +379,7 @@ * This is the system dependent line separator */ private static final char[] line_separator -= System.getProperty(line.separator).toCharArray(); += System.getProperty(line.separator, \n).toCharArray(); /** * This method prints a line separator sequence to the stream. The value signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] RFC: WeakHashMap improvement
Hi, Am Mittwoch, den 26.10.2005, 10:37 +0200 schrieb Roman Kennke: Hi, Friedjof Siebert did some improvements on java.util.WeakHashMap that I'd like to check in. They are meant to improve reliability of this class by enabling the prove of a cast and the absence of a null-pointer. 2005-10-26 Roman Kennke [EMAIL PROTECTED] Reported by Friedjof Siebert [EMAIL PROTECTED] * java/util/WeakHashMap.java (WeakEntrySet.Iterator.checkMod): Improved exception message. (cleanQueue): Replaced null check with instanceof check to prove correctness of cast at the same time. (internalRemove): Removed redundant reads of buckets[slot] and prev.next and added checks to ensure that no null pointer exception may occur and that this can be proved automatically. I committed the attached modified patch that does not replace the null-check with an instanceof check. 2005-10-26 Roman Kennke [EMAIL PROTECTED] Reported by Friedjof Siebert [EMAIL PROTECTED] * java/util/WeakHashMap.java (WeakEntrySet.Iterator.checkMod): Improved exception message. (internalRemove): Removed redundant reads of buckets[slot] and prev.next and added checks to ensure that no null pointer exception may occur and that this can be proved automatically. /Roman Index: java/util/WeakHashMap.java === RCS file: /cvsroot/classpath/classpath/java/util/WeakHashMap.java,v retrieving revision 1.19 diff -u -r1.19 WeakHashMap.java --- java/util/WeakHashMap.java 2 Jul 2005 20:32:42 - 1.19 +++ java/util/WeakHashMap.java 9 Nov 2005 22:50:44 - @@ -241,7 +241,8 @@ // This method will get inlined. cleanQueue(); if (knownMod != modCount) -throw new ConcurrentModificationException(); +throw new ConcurrentModificationException(knownMod + != + + modCount); } /** @@ -698,21 +699,20 @@ // bucket may be enqueued later by the garbage collection, and // internalRemove will be called a second time. bucket.slot = -1; -if (buckets[slot] == bucket) - buckets[slot] = bucket.next; -else - { -WeakBucket prev = buckets[slot]; -/* This may throw a NullPointerException. It shouldn't but if - * a race condition occurred (two threads removing the same - * bucket at the same time) it may happen. br - * But with race condition many much worse things may happen - * anyway. - */ -while (prev.next != bucket) - prev = prev.next; -prev.next = bucket.next; + +WeakBucket prev = null; +WeakBucket next = buckets[slot]; +while (next != bucket) + { + if (next == null) throw new InternalError(WeakHashMap in incosistent state); + prev = next; + next = prev.next; } +if (prev == null) + buckets[slot] = bucket.next; +else + prev.next = bucket.next; + size--; } signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] RFC: WeakHashMap improvement
Hi Roman, On Wed, 2005-11-09 at 23:52 +0100, Roman Kennke wrote: + if (next == null) throw new InternalError(WeakHashMap in incosistent state); As Tom pointed out in the first review inconsistent is not spelled correctly here. Cheers, Mark signature.asc Description: This is a digitally signed message part ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] RFC: WeakHashMap improvement
Roman == Roman Kennke [EMAIL PROTECTED] writes: Two nits... Roman + if (next == null) throw new InternalError(WeakHashMap in incosistent state); This should not all be on one line. Also, 'inconsistent' is misspelled here. Tom ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: gnu_java_awt_peer_gtk_GdkFontPeer.c (initStaticState): missing NewGlobalRef?
On Tue, 2005-11-08 at 19:09 +0100, Mark Wielaard wrote: Yes, nice catch. Now that I have seen this I am surprised we don't have more bugs like this one. it is easy to miss. Cool to know you have a code analyzer for this. Please let us know when the paper is published. We currently have only analyzed the gtk-peer code, since our tool still has some minor bugs. But today we should be able to analyze the whole GNU classpath jni code. We'll see how many bugs we find :-) The paper should be finished tomorrow. TWISTI ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
Re: gnu_java_awt_peer_gtk_GdkFontPeer.c (initStaticState): missing NewGlobalRef?
On Tue, 2005-11-08 at 18:32 -0700, Tom Tromey wrote: Twisti == Christian Thalinger [EMAIL PROTECTED] writes: Perhaps when it is ready we could integrate it into the build, so that errors here are unavoidable? Uhm... that will be difficult since the tool is an enhancement of GCC. It's just another pass to print out some (conservative) warnings about potential missing NewGlobalRef calls. TWISTI ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
[Bug awt/24754] New: FontMetrics handling of newlines broken
The handling of newlines is broken. It should be treated as a character with zero width. What the GTK peer do instead is return the maximum width of the lines in the string. Run the attached testcase and you get the following with the JDK: [EMAIL PROTECTED]:~/src/test$ java TestRightAlignment width of 'abcde': 36 width of 'abcde\nfghij': 61 width of 'abcdefghij': 61 The GTK peers return the following instead: width of 'abcde': 39 width of 'abcde\nfghij': 39 width of 'abcdefghij': 65 I don't know what the Qt peers do here. -- Summary: FontMetrics handling of newlines broken Product: classpath Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P3 Component: awt AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: roman at kennke dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24754 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
Re: Alpha and free java
Wow thats really impressive - I was a little bit sad when I last time visited the Cacao site and saw that the last release was several months ago but I didn't think about the fact that there were holidays :-) A release is scheduled in 1-2 weeks and CACAO does not have anymore a own version of GNU classpath. It uses upstream releases or cvs heads, as you like :-) CACAO 0.93 will work for 0.19+. Really great, can't await its release! Thanks for that great work, lg Clemens ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
[Bug swing/24651] JMenu layout problem with nested menus
--- Comment #25 from roman at kennke dot org 2005-11-09 15:30 --- Subject: Re: JMenu layout problem with nested menus Hi Norman, Am Mittwoch, den 09.11.2005, 13:44 + schrieb hendrich at informatik dot uni-hamburg dot de: --- Comment #24 from hendrich at informatik dot uni-hamburg dot de 2005-11-09 13:44 --- Hey this is a nice app! This can serve us as a testapplication for regular testing. Would you mind distributing this under a free software license? Then we could also add it to our Wiki section FreeSwingApps.. Consider it free to use for classpath development :-) (make that LGPL). Cool. A first run of the app shows no big performance problems here. The popup menus come up reasonably fast (could be better, but surely not several seconds. my feeling is slightly less than 1sec). Also I see no flickering. Surprising. Are you using jamvm or gcj or something else? I always thought my Ahtlon 2600+ was fast enough (and it was with classpath only three weeks ago)... open the popup-menu and select different submenu entries: actually takes seconds on my system. Really strange. I tried with JamVM1.3.3 and current Classpath. I even installed and tried ctwm, but it still is reasonably fast (at least with opening menus). I have an Athlon1500MHz. I opened in my home dir and it found ~1 images of different sizes (from icons to some hundred really big (~screensized) images). It took a long while to start up, but when the app runs, then opening menus is ok. What is going slow here is scrolling the tree. But that is a different issue. Do you have any more hints what could cause the performance loss? Is the CPU actually working when you open a menu, or is it at 0% (maybe a locking issue). /Roman -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24651 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
RE: Infinite loop
Archie Cobbs wrote: I'm adapting JCVM to work with a totally unmodified Classpath, but doing so seems to cause an infinite loop in Mauve test gnu.testlet.java.util.logging.Logger.getAnonymousLogger. The infinite loop is simple: Class.getClassLoader() invokes VMStackWalker.getCallingClassLoader() VMStackWalker.getCallingClassLoader() invokes Class.getClassLoader() It would be nice if VMStackWalker.getCallingClassLoader() could invoke VMClass.getClassLoader(), but access permissions prevent that. Any ideas? One idea is to move VMStackWalker into java.lang. We can't do that, it needs to be public. I guess that VMStackWalker should have a native method to get the class loader from a Class. Regards, Jeroen ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
Re: Infinite loop
Jeroen Frijters wrote: The infinite loop is simple: Class.getClassLoader() invokes VMStackWalker.getCallingClassLoader() VMStackWalker.getCallingClassLoader() invokes Class.getClassLoader() It would be nice if VMStackWalker.getCallingClassLoader() could invoke VMClass.getClassLoader(), but access permissions prevent that. Any ideas? One idea is to move VMStackWalker into java.lang. We can't do that, it needs to be public. I guess that VMStackWalker should have a native method to get the class loader from a Class. Sounds good.. how about this? -Archie __ Archie Cobbs *CTO, Awarix* http://www.awarix.com Index: VMStackWalker.java === RCS file: /cvsroot/classpath/classpath/vm/reference/gnu/classpath/VMStackWalker.java,v retrieving revision 1.5 diff -u -r1.5 VMStackWalker.java --- VMStackWalker.java 2 Jul 2005 20:33:08 - 1.5 +++ VMStackWalker.java 9 Nov 2005 17:44:29 - @@ -88,9 +88,9 @@ /** * Get the class loader associated with the Class returned by - * codegetCallingClass()/code, or codenull/code if no - * such class exists or it is the boot loader. This method is an optimization - * for the expression codegetClassContext()[1].getClassLoader()/code + * codegetCallingClass()/code, or codenull/code if no such class + * exists or it is the boot loader. This method is an optimization for the + * expression codeVMStackWalker.getClassLoader(getClassContext()[1])/code * and should return the same result. * * p @@ -102,7 +102,15 @@ Class[] ctx = getClassContext(); if (ctx.length 3) return null; -return ctx[2].getClassLoader(); +return getClassLoader(ctx[2]); } + + /** + * Retrieve the class's ClassLoader, or codenull/code if loaded + * by the bootstrap loader. I.e., this should return the same thing + * as [EMAIL PROTECTED] java.lang.VMClass#getClassLoader}. This duplicate version + * is here to work around access permissions. + */ + public static native ClassLoader getClassLoader(Class cl); } ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
Re: Infinite loop
Seems like we could remove VMClass.getClassLoader altogether then since it's public and static in VMStackWalker? On the other hand, should it be public in VMStackWalker? Is that ok from a security standpoint? Stuart. -- http://sab39.dev.netreach.com/ ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
Re: Infinite loop
Stuart Ballard wrote: Seems like we could remove VMClass.getClassLoader altogether then since it's public and static in VMStackWalker? Yes, I suppose so... On the other hand, should it be public in VMStackWalker? Is that ok from a security standpoint? Yes.. all the other methods in there are too. VMStackWalker can only be used by classes loaded via the boot loader (see comment at the top). -Archie __ Archie Cobbs *CTO, Awarix* http://www.awarix.com ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
Re: Infinite loop
On Wed, 2005-11-09 at 14:12 -0600, Archie Cobbs wrote: Stuart Ballard wrote: Seems like we could remove VMClass.getClassLoader altogether then since it's public and static in VMStackWalker? Yes, I suppose so... I can imagine a vm optimizing VMClass.getClassLoader() differently from VmStackWalker.getClassLoader(). So I would keep them both just in case. Unless you think that is really messy or a really far fetched optimization oppertunity. On the other hand, should it be public in VMStackWalker? Is that ok from a security standpoint? Yes.. all the other methods in there are too. VMStackWalker can only be used by classes loaded via the boot loader (see comment at the top). I must admit that it took me also a bit of thinking why this is safe. A user defined class loader loadClass() method needs to handle SecurityManager.checkPackageAccess() when a security manager is installed. And since any class can only access another class through loading the class directly or indirectly through its own class loader this can be used to deny any access to classes not loaded by the bootstrap class loader. See the GNU Classpath ClassLoader createSystemClassLoader() method for an example of how this works. Cheers, Mark -- Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html Join the community at http://planet.classpath.org/ signature.asc Description: This is a digitally signed message part ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
[commit-cp] classpath ./ChangeLog native/jni/gtk-peer/gnu_j...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Christian Thalinger [EMAIL PROTECTED] 05/11/09 09:58:56 Modified files: . : ChangeLog native/jni/gtk-peer: gnu_java_awt_peer_gtk_GdkFontPeer.c Log message: 2005-11-09 Christian Thalinger [EMAIL PROTECTED] * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c (initStaticState): Register global variable glyphVector_class as global reference. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5522tr2=1.5523r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c.diff?tr1=1.10tr2=1.11r1=textr2=text
[commit-cp] classpath ./ChangeLog javax/swing/JList.java
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: David Gilbert [EMAIL PROTECTED] 05/11/09 10:48:28 Modified files: . : ChangeLog javax/swing: JList.java Log message: 2005-11-09 David Gilbert [EMAIL PROTECTED] * javax/swing/JList.java (setModel): throw IllegalArgumentException for null model. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5524tr2=1.5525r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JList.java.diff?tr1=1.38tr2=1.39r1=textr2=text
[commit-cp] classpath ./ChangeLog javax/swing/JComponent.java
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Roman Kennke [EMAIL PROTECTED]05/11/09 14:44:01 Modified files: . : ChangeLog javax/swing: JComponent.java Log message: 2005-11-09 Roman Kennke [EMAIL PROTECTED] * javax/swing/JComponent.java (paint): Fetch a new componentGraphics here instead of paintComponent. (paintComponent): Don't fetch the componentGraphics here. This must be done in paint. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5525tr2=1.5526r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JComponent.java.diff?tr1=1.77tr2=1.78r1=textr2=text
[commit-cp] classpath ./ChangeLog javax/swing/plaf/Componen...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Roman Kennke [EMAIL PROTECTED]05/11/09 14:52:02 Modified files: . : ChangeLog javax/swing/plaf: ComponentUI.java Log message: 2005-11-09 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/ComponentUI.java (update): Restore the foreground color after filling the background. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5526tr2=1.5527r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/ComponentUI.java.diff?tr1=1.12tr2=1.13r1=textr2=text
[commit-cp] classpath ./ChangeLog org/omg/PortableIntercept...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Audrius MeÂkauskas [EMAIL PROTECTED] 05/11/09 15:44:44 Modified files: . : ChangeLog org/omg/PortableInterceptor: ObjectReferenceFactory.java Log message: 2005-11-09 Audrius Meskauskas [EMAIL PROTECTED] * org/omg/PortableInterceptor/ObjectReferenceFactory.java: Do not inherit from org.omg.CORBA.Object. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5527tr2=1.5528r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/org/omg/PortableInterceptor/ObjectReferenceFactory.java.diff?tr1=1.1tr2=1.2r1=textr2=text
[commit-cp] classpath ./ChangeLog examples/gnu/classpath/ex...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: David Gilbert [EMAIL PROTECTED] 05/11/09 16:37:56 Modified files: . : ChangeLog examples/gnu/classpath/examples/swing: Demo.java Added files: examples/gnu/classpath/examples/swing: FileChooserDemo.java Log message: 2005-11-09 David Gilbert [EMAIL PROTECTED] * examples/gnu/classpath/examples/swing/Demo.java (mkMenuBar): added file chooser item, (mkButtonBar): split buttons into two rows, added 'FileChooser' button, * examples/gnu/classpath/examples/swing/FileChooserDemo.java: New file. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5528tr2=1.5529r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/examples/gnu/classpath/examples/swing/FileChooserDemo.java?rev=1.1 http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/examples/gnu/classpath/examples/swing/Demo.java.diff?tr1=1.27tr2=1.28r1=textr2=text
[commit-cp] classpath ./ChangeLog javax/swing/JTabbedPane.j...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Lillian Angel [EMAIL PROTECTED] 05/11/09 16:52:35 Modified files: . : ChangeLog javax/swing: JTabbedPane.java javax/swing/plaf/metal: MetalTabbedPaneUI.java Log message: 2005-11-09 Lillian Angel [EMAIL PROTECTED] * javax/swing/JTabbedPane.java (setComponent): Added check to prevent infinite loops. * javax/swing/plaf/metal/MetalTabbedPaneUI.java (createLayoutManager): Should call super here, so the layout is set properly depending on the layout mode. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5529tr2=1.5530r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JTabbedPane.java.diff?tr1=1.22tr2=1.23r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/metal/MetalTabbedPaneUI.java.diff?tr1=1.9tr2=1.10r1=textr2=text
[commit-cp] classpath ./ChangeLog org/omg/PortableIntercept...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Audrius MeÂkauskas [EMAIL PROTECTED] 05/11/09 18:40:31 Modified files: . : ChangeLog Added files: org/omg/PortableInterceptor: ObjectReferenceTemplate.java ObjectReferenceTemplateHelper.java ObjectReferenceTemplateHolder.java Log message: 2005-11-09 Audrius Meskauskas [EMAIL PROTECTED] * org/omg/PortableInterceptor/ObjectReferenceTemplate.java, org/omg/PortableInterceptor/ObjectReferenceTemplateHelper.java, org/omg/PortableInterceptor/ObjectReferenceTemplateHolder.java: New files. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5530tr2=1.5531r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/org/omg/PortableInterceptor/ObjectReferenceTemplate.java?rev=1.1 http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/org/omg/PortableInterceptor/ObjectReferenceTemplateHelper.java?rev=1.1 http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/org/omg/PortableInterceptor/ObjectReferenceTemplateHolder.java?rev=1.1
[commit-cp] classpath ./ChangeLog javax/swing/ComponentInpu...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Anthony Balkissoon [EMAIL PROTECTED] 05/11/09 19:15:03 Modified files: . : ChangeLog javax/swing: ComponentInputMap.java JComponent.java Log message: 2005-11-09 Anthony Balkissoon [EMAIL PROTECTED] * javax/swing/ComponentInputMap.java: (put): Notify the component. (clear): Likewise. (remove): Likewise. (setParent): Notify the parent. Improved the exception messages. * javax/swing/JComponent.java: (inputMap_whenInFocusedWindow): Changed type from InputMap to ComponentInputMap. (setInputMap): If we're setting the WHEN_IN_FOCUSED_WINDOW map and the parameter is not a ComponentInputMap or is not associated with the same Component, throw an IllegalArgumentException. (getInputMap): Create a new ComponentInputMap instead of a new InputMap when the WHEN_IN_FOCUSED_WINDOW map doesn't yet exist. (udpateComponentInputMap): New method. This is the method that ComponentInputMap calls when it is updated. Not yet completely implemented. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5532tr2=1.5533r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/ComponentInputMap.java.diff?tr1=1.8tr2=1.9r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JComponent.java.diff?tr1=1.78tr2=1.79r1=textr2=text
[commit-cp] classpath/vm/reference/gnu/java/net
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Roman Kennke [EMAIL PROTECTED]05/11/09 20:56:31 classpath/vm/reference/gnu/java/net Update of /cvsroot/classpath/classpath/vm/reference/gnu/java/net In directory savannah:/tmp/cvs-serv22125/vm/reference/gnu/java/net Log Message: Directory /cvsroot/classpath/classpath/vm/reference/gnu/java/net added to the repository
[commit-cp] classpath ./ChangeLog javax/swing/JTabbedPane.java
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Lillian Angel [EMAIL PROTECTED] 05/11/09 21:30:10 Modified files: . : ChangeLog javax/swing: JTabbedPane.java Log message: 2005-11-09 Lillian Angel [EMAIL PROTECTED] * javax/swing/JTabbedPane.java (setComponent): No need to remove and add tab. (remove): Fixed API documentation. (remove): Fixed API documentation. Re-implemented according to API. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5536tr2=1.5537r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JTabbedPane.java.diff?tr1=1.23tr2=1.24r1=textr2=text
[commit-cp] classpath ./ChangeLog javax/swing/JComponent.ja...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Anthony Balkissoon [EMAIL PROTECTED] 05/11/09 21:59:40 Modified files: . : ChangeLog javax/swing: JComponent.java Added files: javax/swing: KeyboardManager.java Log message: 2005-11-09 Anthony Balkissoon [EMAIL PROTECTED] * javax/swing/JComponent.java: (processKeyEvent): Use local variables for boolean pressed and for the KeyStroke. Implemented the code for WHEN_IN_FOCUSED_WINDOW bindings. (updateComponentInputMap): Implemented and fixed typo in docs. * javax/swing/KeyboardManager.java: New class. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5537tr2=1.5538r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/KeyboardManager.java?rev=1.1 http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JComponent.java.diff?tr1=1.79tr2=1.80r1=textr2=text
[commit-cp] classpath ChangeLog INSTALL
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Mark Wielaard [EMAIL PROTECTED] 05/11/09 22:31:01 Modified files: . : ChangeLog INSTALL Log message: Reported by Petteri R\uty [EMAIL PROTECTED] * INSTALL: Remove double --enable-xmlj entry. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5539tr2=1.5540r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/INSTALL.diff?tr1=1.33tr2=1.34r1=textr2=text
[commit-cp] classpath ./ChangeLog java/io/PrintWriter.java
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Roman Kennke [EMAIL PROTECTED]05/11/09 22:48:58 Modified files: . : ChangeLog java/io: PrintWriter.java Log message: 2005-11-09 Roman Kennke [EMAIL PROTECTED] Reported by Friedjof Siebert [EMAIL PROTECTED] * java/io/PrintWriter.java (line_separator): Added default value for property to ensure absence of null pointer exception even if property is not set. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5541tr2=1.5542r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/io/PrintWriter.java.diff?tr1=1.19tr2=1.20r1=textr2=text
[commit-cp] classpath ./ChangeLog java/util/WeakHashMap.java
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Roman Kennke [EMAIL PROTECTED]05/11/09 22:51:54 Modified files: . : ChangeLog java/util : WeakHashMap.java Log message: 2005-10-26 Roman Kennke [EMAIL PROTECTED] Reported by Friedjof Siebert [EMAIL PROTECTED] * java/util/WeakHashMap.java (WeakEntrySet.Iterator.checkMod): Improved exception message. (internalRemove): Removed redundant reads of buckets[slot] and prev.next and added checks to ensure that no null pointer exception may occur and that this can be proved automatically. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5542tr2=1.5543r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/util/WeakHashMap.java.diff?tr1=1.19tr2=1.20r1=textr2=text
[commit-cp] classpath ./ChangeLog javax/swing/JComponent.java
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Anthony Balkissoon [EMAIL PROTECTED] 05/11/09 23:14:39 Modified files: . : ChangeLog javax/swing: JComponent.java Log message: 2005-11-09 Anthony Balkissoon [EMAIL PROTECTED] * javax/swing/JComponent.java: (addNotify): Unregister all WHEN_IN_FOCUSED_WINDOW bindings for this JComponent and then register them with its (potentially) new top level ancestor. Removed unncessary code that copied regular (WHEN_FOCUSED) key bindings up the parent hierarchy. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5543tr2=1.5544r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JComponent.java.diff?tr1=1.80tr2=1.81r1=textr2=text