[cp-patches] FYI: JTabbedPane fixes
This patch fixes a couple of issues in the JTabbedPane: - in removeTabAt, the selection needs to be adjusted, so that it doesn't point to an illegal tab afterwards. - not only the tab must be removed, but also the component that is displayed by the tab. This has been a potential memory leak (no components ever removed from the JTabbedPane) - in removeAll() we need to use getTabCount() instead of tabs.size() (the latter causes an ArrayIndexOutOfBounds later somehow) and set the selectionIndex to -1 2006-03-30 Roman Kennke [EMAIL PROTECTED] * javax/swing/JTabbedPane.java (removeTabAt): Adjust selection correctly when removing a tab before the selected tab. Also remove the component from the container, not only the tab object. Repaint and revalidate the component after the removal. (removeAll): Set selection to -1 before removing the tabs. /Roman Index: javax/swing/JTabbedPane.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JTabbedPane.java,v retrieving revision 1.34 diff -u -1 -0 -r1.34 JTabbedPane.java --- javax/swing/JTabbedPane.java 24 Mar 2006 12:58:48 - 1.34 +++ javax/swing/JTabbedPane.java 30 Mar 2006 12:08:43 - @@ -1150,22 +1150,61 @@ /** * Removes the tab at index. After the component associated with * index is removed, its visibility is reset to true to ensure it * will be visible if added to other containers. * * @param index The index of the tab to remove. */ public void removeTabAt(int index) { checkIndex(index, 0, tabs.size()); + +// We need to adjust the selection if we remove a tab that comes +// before the selected tab or if the selected tab is removed. +// This decrements the selected index by 1 if any of this is the case. +// Note that this covers all cases: +// - When the selected tab comes after the removed tab, this simply +// adjusts the selection so that after the removal the selected tab +// is still the same. +// - When we remove the currently selected tab, then the tab before the +// selected tab gets selected. +// - When the last tab is removed, then we have an index==0, which gets +// decremented to -1, which means no selection, which is 100% perfect. +int selectedIndex = getSelectedIndex(); +System.err.println(index: + index); +System.err.println(selectedIndex: + selectedIndex); +if (selectedIndex = index) + setSelectedIndex(selectedIndex - 1); + +Component comp = getComponentAt(index); + +// Remove the tab object. tabs.remove(index); -getComponentAt(index).show(); + +// Remove the component. I think we cannot assume that the tab order +// is equal to the component order, so we iterate over the children +// here to find the and remove the correct component. +if (comp != null) + { +Component[] children = getComponents(); +for (int i = children.length - 1; i = 0; --i) + { +if (children[i] == comp) + { +super.remove(i); +comp.setVisible(true); +break; + } + } + } +revalidate(); +repaint(); } /** * Removes the specified Component from the JTabbedPane. * * @param component The Component to remove. */ public void remove(Component component) { super.remove(component); @@ -1181,21 +1220,22 @@ super.remove(index); removeTabAt(index); } /** * This method removes all tabs and associated components from the * JTabbedPane. */ public void removeAll() { -for (int i = tabs.size() - 1; i = 0; i--) +setSelectedIndex(-1); +for (int i = getTabCount() - 1; i = 0; i--) removeTabAt(i); } /** * This method returns how many tabs are in the JTabbedPane. * * @return The number of tabs in the JTabbedPane. */ public int getTabCount() {
[cp-patches] FYI: BasicTextUI.createKeymap()
I fixed the BasicTextUI.createKeymap() method. This method is only used for backward compatibility though. 2006-03-30 Roman Kennke [EMAIL PROTECTED] PR 26045 * javax/swing/plaf/basic/BasicTextUI.java (installKeyboardActions): Simply call getKeymap() and install this. (createKeymap): Reimplemented to fetch a keymap from the UIManager. /Roman Index: javax/swing/plaf/basic/BasicTextUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTextUI.java,v retrieving revision 1.75 diff -u -1 -0 -r1.75 BasicTextUI.java --- javax/swing/plaf/basic/BasicTextUI.java 23 Mar 2006 21:18:45 - 1.75 +++ javax/swing/plaf/basic/BasicTextUI.java 30 Mar 2006 12:35:00 - @@ -689,59 +689,46 @@ return className; } /** * Creates the [EMAIL PROTECTED] Keymap} that is installed on the text component. * * @return the [EMAIL PROTECTED] Keymap} that is installed on the text component */ protected Keymap createKeymap() { -// FIXME: It seems to me that this method implementation is wrong. It seems -// to fetch the focusInputMap and transform it to the KeyBinding/Keymap -// implemenation. I would think that it should be done the other way, -// fetching the keybindings (from prefix + .bindings) and transform -// it to the newer InputMap/ActionMap implementation. -JTextComponent.KeyBinding[] bindings = null; -String prefix = getPropertyPrefix(); -InputMapUIResource m = (InputMapUIResource) UIManager.get(prefix + .focusInputMap); -if (m != null) +String keymapName = getKeymapName(); +Keymap keymap = JTextComponent.getKeymap(keymapName); +if (keymap == null) { -KeyStroke[] keys = m.keys(); -int len = keys.length; -bindings = new JTextComponent.KeyBinding[len]; -for (int i = 0; i len; i++) +Keymap parentMap = + JTextComponent.getKeymap(JTextComponent.DEFAULT_KEYMAP); +keymap = JTextComponent.addKeymap(keymapName, parentMap); +Object val = UIManager.get(getPropertyPrefix() + .keyBindings); +if (val != null val instanceof JTextComponent.KeyBinding[]) { -KeyStroke curr = keys[i]; -bindings[i] = new JTextComponent.KeyBinding(curr, -(String) m.get(curr)); +JTextComponent.KeyBinding[] bindings = + (JTextComponent.KeyBinding[]) val; +JTextComponent.loadKeymap(keymap, bindings, + getComponent().getActions()); } } -if (bindings == null) - bindings = new JTextComponent.KeyBinding[0]; - -Keymap km = JTextComponent.addKeymap(getKeymapName(), - JTextComponent.getKeymap(JTextComponent.DEFAULT_KEYMAP)); -JTextComponent.loadKeymap(km, bindings, textComponent.getActions()); -return km; +return keymap; } /** * Installs the keyboard actions on the text components. */ protected void installKeyboardActions() { -// load key bindings for the older interface -Keymap km = JTextComponent.getKeymap(getKeymapName()); -if (km == null) - km = createKeymap(); -textComponent.setKeymap(km); +// This is only there for backwards compatibility. +textComponent.setKeymap(createKeymap()); // load any bindings for the newer InputMap / ActionMap interface SwingUtilities.replaceUIInputMap(textComponent, JComponent.WHEN_FOCUSED, getInputMap(JComponent.WHEN_FOCUSED)); SwingUtilities.replaceUIActionMap(textComponent, createActionMap()); ActionMap parentActionMap = new ActionMapUIResource(); Action[] actions = textComponent.getActions(); for (int j = 0; j actions.length; j++) {
Re: [cp-patches] FYI: JTabbedPane fixes
Hi Roman, On Thu, 2006-03-30 at 14:18 +0200, Roman Kennke wrote: +int selectedIndex = getSelectedIndex(); +System.err.println(index: + index); +System.err.println(selectedIndex: + selectedIndex); +if (selectedIndex = index) + setSelectedIndex(selectedIndex - 1); You left in some debug code. Cheers, Mark signature.asc Description: This is a digitally signed message part
Re: [cp-patches] FYI: JTabbedPane fixes
Hi Mark, On Thu, 2006-03-30 at 14:18 +0200, Roman Kennke wrote: +int selectedIndex = getSelectedIndex(); +System.err.println(index: + index); +System.err.println(selectedIndex: + selectedIndex); +if (selectedIndex = index) + setSelectedIndex(selectedIndex - 1); You left in some debug code. Ouch. : 2006-03-30 Roman Kennke [EMAIL PROTECTED] * javax/swing/JTabbedPane.java (removeTabAt): Removed debug code. Roman Index: javax/swing/JTabbedPane.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JTabbedPane.java,v retrieving revision 1.35 diff -u -1 -0 -r1.35 JTabbedPane.java --- javax/swing/JTabbedPane.java 30 Mar 2006 12:15:51 - 1.35 +++ javax/swing/JTabbedPane.java 30 Mar 2006 14:52:01 - @@ -1163,22 +1163,20 @@ // This decrements the selected index by 1 if any of this is the case. // Note that this covers all cases: // - When the selected tab comes after the removed tab, this simply // adjusts the selection so that after the removal the selected tab // is still the same. // - When we remove the currently selected tab, then the tab before the // selected tab gets selected. // - When the last tab is removed, then we have an index==0, which gets // decremented to -1, which means no selection, which is 100% perfect. int selectedIndex = getSelectedIndex(); -System.err.println(index: + index); -System.err.println(selectedIndex: + selectedIndex); if (selectedIndex = index) setSelectedIndex(selectedIndex - 1); Component comp = getComponentAt(index); // Remove the tab object. tabs.remove(index); // Remove the component. I think we cannot assume that the tab order // is equal to the component order, so we iterate over the children
Re: [cp-patches] RFC: GtkWindow/FramePeer.postConfigureEvent() deadlock fix
On Wed, 2006-03-29 at 23:41 +0200, Mark Wielaard wrote: OK, here it is. I need to test it some more, clean it up and write a proper ChangeLog entry. But it seems robust and to perform OK. At least not worse then what we currently have. It also cleans up the code a bit (imho). If you could take a look and/or try it out on something nasty that would be appreciated. I tested it some more and found one bug. We need to update the menubar width of a Frame if it contains one. That has been added. Also tried against hsqldb DataBase Manager and MegaMek and both seem to work as before. 2006-03-30 Mark Wielaard [EMAIL PROTECTED] PR 23527 * java/awt/Window.java (dispatchEventImpl): On ComponentEvents adjust bounds. On resize invalidate and validate container. Always pass on ComponentEvents to Container super class. * gnu/java/awt/peer/gtk/GtkFramePeer.java (setBounds): Adjust for menuBar and pass to GtkWindowPeer super class. (postConfigureEvent): Adjust menu bar width. Adjust y and height bounds and pass to GtkWindowPeer super class. * gnu/java/awt/peer/gtk/GtkWindowPeer.java (x, y, width, height): New fields for local bounds. (getX, getY): New methods. (getWidth): Don't call into awtComponent. (getHeight): Likewise. (create): Cache local bounds. (setLocation): Documented, made protected and just call nativeSetLocation. (setLocationUnlocked): Removed unused method. (setBoundsUnlocked): Likewise. (setBounds): Check whether bounds actually changed and cache local bounds. (setSize): Documented and made protected. (setResizable): Documented and cache local bounds. (postConfigureEvent): Update local bounds. Don't call awtComponent directly but post ComponentEvents. (show): Cache local bounds. (getBounds): Override to return cached bounds. What do you think? Cheers, Mark Index: java/awt/Window.java === RCS file: /cvsroot/classpath/classpath/java/awt/Window.java,v retrieving revision 1.67 diff -u -r1.67 Window.java --- java/awt/Window.java 25 Mar 2006 10:54:32 - 1.67 +++ java/awt/Window.java 30 Mar 2006 15:11:34 - @@ -1,5 +1,5 @@ /* Window.java -- - Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation + Copyright (C) 1999, 2000, 2002, 2003, 2004, 2006 Free Software Foundation This file is part of GNU Classpath. @@ -622,10 +622,25 @@ || windowStateListener != null || (eventMask AWTEvent.WINDOW_EVENT_MASK) != 0)) processEvent(e); -else if (e.id == ComponentEvent.COMPONENT_RESIZED) - validate (); -else - super.dispatchEventImpl(e); +else + { + if (e.id == ComponentEvent.COMPONENT_RESIZED + || e.id == ComponentEvent.COMPONENT_MOVED) + { + Rectangle bounds = peer.getBounds(); + x = bounds.x; + y = bounds.y; + height = bounds.height; + width = bounds.width; + + if (e.id == ComponentEvent.COMPONENT_RESIZED) + { + invalidate(); + validate(); + } + } + super.dispatchEventImpl(e); + } } /** Index: gnu/java/awt/peer/gtk/GtkFramePeer.java === RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/GtkFramePeer.java,v retrieving revision 1.45 diff -u -r1.45 GtkFramePeer.java --- gnu/java/awt/peer/gtk/GtkFramePeer.java 16 Mar 2006 03:24:18 - 1.45 +++ gnu/java/awt/peer/gtk/GtkFramePeer.java 30 Mar 2006 15:11:34 - @@ -1,5 +1,5 @@ /* GtkFramePeer.java -- Implements FramePeer with GTK - Copyright (C) 1999, 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 1999, 2002, 2004, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -122,25 +122,11 @@ public void setBounds (int x, int y, int width, int height) { -// prevent window_configure_cb - awtComponent.setSize - -// peer.setBounds - nativeSetBounds self-deadlock on GDK lock. -if (Thread.currentThread() == GtkToolkit.mainThread) - { -int menuBarWidth = width - insets.left - insets.right; -if (menuBar != null menuBarWidth 0) - setMenuBarWidthUnlocked (menuBar, menuBarWidth); - -return; - } - int menuBarWidth = width - insets.left - insets.right; if (menuBar != null menuBarWidth 0) setMenuBarWidth (menuBar, menuBarWidth); -nativeSetBounds (x, y, - width - insets.left - insets.right, - height - insets.top - insets.bottom - + menuBarHeight); +super.setBounds(x, y, width, height + menuBarHeight); } public void setResizable (boolean resizable) @@ -198,26 +184,19 @@ protected void postConfigureEvent (int x, int y, int width, int height) { -int frame_width = width + insets.left + insets.right; +if (menuBar != null width 0) + setMenuBarWidthUnlocked (menuBar, width); + // Since insets.top already includes the
[cp-patches] RFC: gnu.regexp: a fix that makes \G usable
From: Ito Kazumitsu [EMAIL PROTECTED] Subject: [cp-patches] Re: RFC: gnu.regexp: miscellaneous fixes Date: Sat, 25 Mar 2006 01:05:28 +0900 (JST) I have added some touches, and the good news is that all the test cases remaining in Mauve's gnu/testlet/java/util/regex/Pattern/testdata2 pass now. This fix had some bug which caused an infinite loop in java.util.regex.Matcher#find(). That bug has been removed this time, and \G should be usable. ChangeLog: 2006-03-30 Ito Kazumitsu [EMAIL PROTECTED] * gnu/regexp/CharIndexed.java(setAnchor): New method. * gnu/regexp/CharIndexedCharArray.java(setAnchor): New method. * gnu/regexp/CharIndexedInputStream.java(setAnchor): New method. * gnu/regexp/CharIndexedString.java(setAnchor): New method. * gnu/regexp/CharIndexedStringBuffer.java(setAnchor): New method. * gnu/regexp/CharIndexedCharSequence.java: New file. * gnu/regexp/RE.java(makeCharIndexed): Make a new CharIndexed using CharIndexedCharSequence. Use setAnchor when the input object is already a CharIndexed. * java/util/regex/Matcher.java(inputCharIndexed): New field to be used as a parameter of the RE#getMatch. Index: classpath/gnu/regexp/CharIndexed.java === RCS file: /cvsroot/classpath/classpath/gnu/regexp/CharIndexed.java,v retrieving revision 1.4 diff -u -r1.4 CharIndexed.java --- classpath/gnu/regexp/CharIndexed.java 26 Mar 2006 22:01:55 - 1.4 +++ classpath/gnu/regexp/CharIndexed.java 30 Mar 2006 16:48:14 - @@ -108,4 +108,9 @@ * Returns the anchor. */ int getAnchor(); + +/** + * Sets the anchor. + */ +void setAnchor(int anchor); } Index: classpath/gnu/regexp/CharIndexedCharArray.java === RCS file: /cvsroot/classpath/classpath/gnu/regexp/CharIndexedCharArray.java,v retrieving revision 1.4 diff -u -r1.4 CharIndexedCharArray.java --- classpath/gnu/regexp/CharIndexedCharArray.java 26 Mar 2006 22:01:55 - 1.4 +++ classpath/gnu/regexp/CharIndexedCharArray.java 30 Mar 2006 16:48:14 - @@ -77,5 +77,6 @@ public REMatch getLastMatch() { return lastMatch; } public int getAnchor() { return anchor; } +public void setAnchor(int anchor) { this.anchor = anchor; } } Index: classpath/gnu/regexp/CharIndexedCharSequence.java === RCS file: classpath/gnu/regexp/CharIndexedCharSequence.java diff -N classpath/gnu/regexp/CharIndexedCharSequence.java --- /dev/null 1 Jan 1970 00:00:00 - +++ classpath/gnu/regexp/CharIndexedCharSequence.java 30 Mar 2006 16:48:14 - @@ -0,0 +1,82 @@ +/* gnu/regexp/CharIndexedCharSequence.java + Copyright (C) 2006 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 gnu.regexp; +import java.io.Serializable; + +class CharIndexedCharSequence implements CharIndexed, Serializable { +private CharSequence s; +private int anchor; +private int len; + +CharIndexedCharSequence(CharSequence s, int index) { + this.s = s; + len = s.length(); + anchor = index; +} + +public char charAt(int index) { + int pos = anchor +
[cp-patches] FYI: Fixing that looks like a wrongly resolved CVS conflict in changelog.
Paul Jenner reported to me a rather strange looking change in Changelog: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6794tr2=1.6795r1=textr2=text I correct is as I think it should be. 2006-03-30 Audrius Meskauskas [EMAIL PROTECTED] Changelog: Fixed 2006-03-17 wrongly resolved conflict. Audrius. Index: ChangeLog === RCS file: /sources/classpath/classpath/ChangeLog,v retrieving revision 1.6946 diff -u -r1.6946 ChangeLog --- ChangeLog 29 Mar 2006 23:23:36 - 1.6946 +++ ChangeLog 30 Mar 2006 17:16:33 - @@ -2059,9 +2059,18 @@ 2006-03-17 Roman Kennke [EMAIL PROTECTED] - * gnu/java/rmi/activation/ActivationSystemTransient.java (debug): - Set to false. - + * javax/swing/plaf/basic/BasicButtonUI.java + (installDefaults): Only install UI margin if installed margin. + is null or a UIResource. + (uninstallDefaults): Only uninstall margin if it's + a UIResource. + + 2006-03-17 Robert Schuster [EMAIL PROTECTED] + + * javax/swing/text/DefaultCaret.java: + (mouseClicked) Use setDot() and moveDot() instead of + JTextComponent.select(). + 2006-03-17 Robert Schuster [EMAIL PROTECTED] * javax/swing/text/DefaultEditorKit.java: Refactored anonymous
Re: [cp-patches] FYI:RMIC template updates:Using the 2 argument constructor would be slightly cleaner IMO:IllegalStateException.
Audrius == Audrius Meskauskas [EMAIL PROTECTED] writes: Audrius ||The .initCause, if called here, throws the Audrius IllegalStateException. Yeah, I meant: throw new UnexpectedException(exception_message, e); Audrius I am not sure why, the UnexpectedException was constructed with the Audrius single parameter constructor. After I found this I started to use Audrius .detail =. Do you think there is a bug somwhere around Audrius UnexpectedException? It sure sounds like it. Maybe UnexpectedException should override initCause to set its local state...? I don't really know. Tom
Re: [cp-patches] RFC: GtkWindow/FramePeer.postConfigureEvent() deadlock fix
On Thu, 2006-03-30 at 17:44 +0200, Mark Wielaard wrote: On Wed, 2006-03-29 at 23:41 +0200, Mark Wielaard wrote: OK, here it is. I need to test it some more, clean it up and write a proper ChangeLog entry. But it seems robust and to perform OK. At least not worse then what we currently have. It also cleans up the code a bit (imho). If you could take a look and/or try it out on something nasty that would be appreciated. I tested it some more and found one bug. We need to update the menubar width of a Frame if it contains one. That has been added. Also tried against hsqldb DataBase Manager and MegaMek and both seem to work as before. 2006-03-30 Mark Wielaard [EMAIL PROTECTED] PR 23527 * java/awt/Window.java (dispatchEventImpl): On ComponentEvents adjust bounds. On resize invalidate and validate container. Always pass on ComponentEvents to Container super class. * gnu/java/awt/peer/gtk/GtkFramePeer.java (setBounds): Adjust for menuBar and pass to GtkWindowPeer super class. (postConfigureEvent): Adjust menu bar width. Adjust y and height bounds and pass to GtkWindowPeer super class. * gnu/java/awt/peer/gtk/GtkWindowPeer.java (x, y, width, height): New fields for local bounds. (getX, getY): New methods. (getWidth): Don't call into awtComponent. (getHeight): Likewise. (create): Cache local bounds. (setLocation): Documented, made protected and just call nativeSetLocation. (setLocationUnlocked): Removed unused method. (setBoundsUnlocked): Likewise. (setBounds): Check whether bounds actually changed and cache local bounds. (setSize): Documented and made protected. (setResizable): Documented and cache local bounds. (postConfigureEvent): Update local bounds. Don't call awtComponent directly but post ComponentEvents. (show): Cache local bounds. (getBounds): Override to return cached bounds. What do you think? Looks great. Please commit. Thanks, Tom
[cp-patches] JAPI fixes
I committed the following path to fix a couple of API compatibility problems reported by JAPI. 2006-03-30 Chris Burdess [EMAIL PROTECTED] * javax/xml/datatype/DatatypeFactory.java (newDurationDayTime): Fix method signature. * javax/xml/validation/SchemaFactoryLoader.java: New file. -- 犬 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 PGP.sig Description: This is a digitally signed message part
[cp-patches] FYI: JTable initialization fix for JMemorize
This patch fixes the recently reported NPE when starting jMemorize. The reason is, the jMemorize overrides the columnMarginChanged that is called from the JTable super constructor when the user derived instance is still not capable to respond (not yet constructed). The event is fired when setting the initial table row margin. It can be suppressed by setting the margin value before setting the table model value to the table. The Swing Demo table seems still working ok. 2006-03-30 Audrius Meskauskas [EMAIL PROTECTED] * javax.swing.JTable (constructor): Initialize column model column margin and table row margin before setting the table column mode. table model. (initialiseLocalVars): Do not call setIntercellSpacing. Index: JTable.java === RCS file: /sources/classpath/classpath/javax/swing/JTable.java,v retrieving revision 1.90 diff -u -r1.90 JTable.java --- JTable.java 21 Mar 2006 18:42:30 - 1.90 +++ JTable.java 30 Mar 2006 20:33:25 - @@ -1651,13 +1651,22 @@ public JTable (TableModel dm, TableColumnModel cm, ListSelectionModel sm) { boolean autoCreate = false; +TableColumnModel columnModel; if (cm != null) -setColumnModel(cm); +columnModel = cm; else { -setColumnModel(createDefaultColumnModel()); +columnModel = createDefaultColumnModel(); autoCreate = true; - } + } + +// Initialise the intercelar spacing before setting the column model to +// avoid firing unnecessary events. +// The initial incellar spacing is new Dimenstion(1,1). +rowMargin = 1; +columnModel.setColumnMargin(1); +setColumnModel(columnModel); + setSelectionModel(sm == null ? createDefaultSelectionModel() : sm); setModel(dm == null ? createDefaultDataModel() : dm); setAutoCreateColumnsFromModel(autoCreate); @@ -1717,7 +1726,6 @@ this.showVerticalLines = true; this.editingColumn = -1; this.editingRow = -1; -setIntercellSpacing(new Dimension(1,1)); } /**
[cp-patches] Patch: FYI: JPEGQTable
Hi, I committed this patch to implement JPEGQTable and eliminate unnecessary fields in JPEGHuffmanTable. I also committed a new JPEGQTable test to Mauve. Tom 2006-03-30 Thomas Fitzsimmons [EMAIL PROTECTED] * javax/imageio/plugins/jpeg/JPEGQTable.java: New file. * javax/imageio/plugins/jpeg/JPEGHuffmanTable.java (ACChrominanceLengths, ACChrominanceValues, ACLuminanceLengths, ACLuminanceValues, DCChrominanceLengths, DCChrominanceValues, DCLuminanceLengths, DCLuminanceValues): Remove fields. Index: javax/imageio/plugins/jpeg/JPEGHuffmanTable.java === RCS file: /sources/classpath/classpath/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java,v retrieving revision 1.1 diff -u -r1.1 JPEGHuffmanTable.java --- javax/imageio/plugins/jpeg/JPEGHuffmanTable.java 10 Mar 2006 06:13:14 - 1.1 +++ javax/imageio/plugins/jpeg/JPEGHuffmanTable.java 31 Mar 2006 01:59:44 - @@ -45,119 +45,113 @@ */ public class JPEGHuffmanTable { + /** + * Huffman code lengths. + */ private short[] lengths; + /** + * Huffman values. + */ private short[] values; - private static short[] ACChrominanceLengths = { 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, - 4, 4, 0, 1, 2, 0x77 }; - - private static short[] ACChrominanceValues = { 0x00, 0x01, 0x02, 0x03, 0x11, - 0x04, 0x05, 0x21, 0x31, 0x06, - 0x12, 0x41, 0x51, 0x07, 0x61, - 0x71, 0x13, 0x22, 0x32, 0x81, - 0x08, 0x14, 0x42, 0x91, 0xa1, - 0xb1, 0xc1, 0x09, 0x23, 0x33, - 0x52, 0xf0, 0x15, 0x62, 0x72, - 0xd1, 0x0a, 0x16, 0x24, 0x34, - 0xe1, 0x25, 0xf1, 0x17, 0x18, - 0x19, 0x1a, 0x26, 0x27, 0x28, - 0x29, 0x2a, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3a, 0x43, 0x44, - 0x45, 0x46, 0x47, 0x48, 0x49, - 0x4a, 0x53, 0x54, 0x55, 0x56, - 0x57, 0x58, 0x59, 0x5a, 0x63, - 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x73, 0x74, 0x75, - 0x76, 0x77, 0x78, 0x79, 0x7a, - 0x82, 0x83, 0x84, 0x85, 0x86, - 0x87, 0x88, 0x89, 0x8a, 0x92, - 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0x9a, 0xa2, 0xa3, - 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, - 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, - 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, - 0xba, 0xc2, 0xc3, 0xc4, 0xc5, - 0xc6, 0xc7, 0xc8, 0xc9, 0xca, - 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, - 0xd7, 0xd8, 0xd9, 0xda, 0xe2, - 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xf2, 0xf3, - 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, - 0xf9, 0xfa }; - - private static short[] ACLuminanceLengths = { 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, -4, 4, 0, 0, 1, 0x7d }; - - private static short[] ACLuminanceValues = { 0x01, 0x02, 0x03, 0x00, 0x04, - 0x11, 0x05, 0x12, 0x21, 0x31, - 0x41, 0x06, 0x13, 0x51, 0x61, - 0x07, 0x22, 0x71, 0x14, 0x32, - 0x81, 0x91, 0xa1, 0x08, 0x23, - 0x42, 0xb1, 0xc1, 0x15, 0x52, - 0xd1, 0xf0, 0x24, 0x33, 0x62, - 0x72, 0x82, 0x09, 0x0a, 0x16, - 0x17, 0x18, 0x19, 0x1a, 0x25, - 0x26, 0x27, 0x28, 0x29, 0x2a, - 0x34, 0x35, 0x36, 0x37, 0x38, -
Re: [cp-patches] Patch: FYI: JPEGQTable
Tom == Thomas Fitzsimmons [EMAIL PROTECTED] writes: Tom + public static final JPEGQTable K1Luminance = new JPEGQTable(new int[] Tom + { For these it would be mildly better to have a private constructor which doesn't copy the argument. Tom +int[] tableCopy = new int[table.length]; Tom +System.arraycopy(table, 0, tableCopy, 0, table.length); Tom +return tableCopy; This is: return (int[]) table.clone(); Tom + public JPEGQTable getScaledInstance(float scaleFactor, Tom + boolean forceBaseline) Tom + { Tom +int[] scaledTable = getTable(); Somehow this should also be able to make a single copy of the table. Right now it makes 2 -- one here and one in the constructor. Tom
[cp-patches] FYI: Point2D - fix for bug #26955
This patch (committed) fixes bug #26955: 2006-03-31 David Gilbert [EMAIL PROTECTED] Fixes bug #26955 * java/awt/geom/Point2D.java (distanceSq(double, double)): Fixed order of arguments, (distanceSq(Point2D)): Likewise, (distance(double, double)): Likewise, (distance(Point2D)): Likewise. Regards, Dave Index: java/awt/geom/Point2D.java === RCS file: /sources/classpath/classpath/java/awt/geom/Point2D.java,v retrieving revision 1.9 diff -u -r1.9 Point2D.java --- java/awt/geom/Point2D.java 2 Jul 2005 20:32:29 - 1.9 +++ java/awt/geom/Point2D.java 31 Mar 2006 03:14:37 - @@ -1,5 +1,5 @@ /* Point2D.java -- generic point in 2-D space - Copyright (C) 1999, 2000, 2002, 2004 Free Software Foundation + Copyright (C) 1999, 2000, 2002, 2004, 2006, Free Software Foundation This file is part of GNU Classpath. @@ -135,7 +135,7 @@ */ public double distanceSq(double x, double y) { -return distanceSq(getX(), x, getY(), y); +return distanceSq(getX(), getY(), x, y); } /** @@ -147,7 +147,7 @@ */ public double distanceSq(Point2D p) { -return distanceSq(getX(), p.getX(), getY(), p.getY()); +return distanceSq(getX(), getY(), p.getX(), p.getY()); } /** @@ -159,7 +159,7 @@ */ public double distance(double x, double y) { -return distance(getX(), x, getY(), y); +return distance(getX(), getY(), x, y); } /** @@ -171,7 +171,7 @@ */ public double distance(Point2D p) { -return distance(getX(), p.getX(), getY(), p.getY()); +return distance(getX(), getY(), p.getX(), p.getY()); } /**
[cp-testresults] FAIL: regressions for libgcj on Thu Mar 30 08:16:13 UTC 2006
Baseline from: Thu Mar 30 02:47:41 UTC 2006 Regressions: FAIL: Thread_Sleep output - source compiled test Totals: PASS: 3427 XPASS: 4 FAIL: 1 XFAIL: 15 ___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
[cp-testresults] FAIL: regressions for mauve-jamvm on Thu Mar 30 09:02:39 UTC 2006
Baseline from: Thu Mar 30 03:32:55 UTC 2006 Regressions: FAIL: gnu.testlet.java.lang.Thread.sleep: Interrupted sleep (number 2) New fails: FAIL: gnu.testlet.gnu.java.security.key.dss.TestOfDSSKeyGeneration abnormal termination 142 CRASH or TIMEOUT FAIL: gnu.testlet.gnu.javax.swing.text.html.parser.support.Parser.HTML_randomTable: Exception: java.lang.Exception: 'htmlhead/headbodytable tr td C_0_0/tr trtdC_1_0/td td C_1_1td C_1_2/tbody/table/body/html' - 'htmlhead/headbodytabletbodytrtd'C_0_0'/td/trtrtd'C_1_0'/tdtd'C_1_1'/tdtd'C_1_2'/tbody/td/tr/tbody/table/body/html' expected 'htmlhead/headbodytabletbodytrtd'C_0_0'/td/trtrtd'C_1_0'/tdtd'C_1_1'/tdtd'C_1_2'/td/tr/tbody/table/body/html' (number 1) Totals: PASS: 31143 XPASS: 0 FAIL: 307 XFAIL: 0 ___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
[cp-testresults] FAIL: regressions for libgcj on Thu Mar 30 13:34:43 UTC 2006
Baseline from: Thu Mar 30 02:47:41 UTC 2006 Regressions: FAIL: Thread_Sleep output - bytecode-native test Totals: PASS: 3427 XPASS: 4 FAIL: 1 XFAIL: 15 ___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
[cp-testresults] FAIL: regressions for mauve-jamvm on Thu Mar 30 14:21:43 UTC 2006
Baseline from: Thu Mar 30 03:32:55 UTC 2006 Regressions: FAIL: gnu.testlet.java.lang.Thread.sleep: Interrupted sleep (number 2) New fails: FAIL: gnu.testlet.gnu.java.security.key.dss.TestOfDSSCodec abnormal termination 142 CRASH or TIMEOUT FAIL: gnu.testlet.gnu.javax.crypto.key.dh.TestOfDHKeyAgreements abnormal termination 142 CRASH or TIMEOUT FAIL: gnu.testlet.gnu.javax.crypto.key.dh.TestOfDHKeyGeneration abnormal termination 142 CRASH or TIMEOUT FAIL: gnu.testlet.gnu.javax.swing.text.html.parser.support.Parser.HTML_randomTable: Exception: java.lang.Exception: 'htmlhead/headbodytablecaptioncapt/caption tr tdC_0_0/tdtd C_0_1td C_0_2/tdtd C_0_3 tr td C_1_0 /tdtd C_1_1td C_1_2td C_1_3/tdtdC_1_4/td trtd C_2_0/td /tr /tbody/table/body/html' - 'htmlhead/headbodytablecaption'capt'/captiontbodytrtd'C_0_0'/tdtd'C_0_1'/tdtd'C_0_2'/tdtd'C_0_3'/td/trtrtd'C_1_0'/tdtd'C_1_1'/tdtd'C_1_2'/tdtd'C_1_3'/tdtd'C_1_4'/td/trtrtd'C_2_0'/td/tr/tbody/tbody/table/body/html' expected 'htmlhead/headbodytablecaption'capt'/captiontbodytrtd'C_0_0'/tdtd'C_0_1'/tdtd'C_0_2'/tdtd'C_0_3'/td/trtrtd'C_1_0'/tdtd'C_1_1'/tdtd'C_1_2'/tdtd'C_1_3'/tdtd'C_1_4'/td/trtrtd'C_2_0'/td/tr/tbody/table/body/html' (number 1) FAIL: gnu.testlet.java.util.logging.SocketHandler.publish abnormal termination 139 CRASH or TIMEOUT Totals: PASS: 31108 XPASS: 0 FAIL: 310 XFAIL: 0 ___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
[cp-testresults] FAIL: gcc build on Thu Mar 30 22:47:02 UTC 2006
/home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/loop-invariant.c -o loop-invariant.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/tree-ssa-loop-im.c -o tree-ssa-loop-im.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/debug.c -o debug.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/df-core.c -o df-core.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/df-problems.c -o df-problems.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/df-scan.c -o df-scan.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/dfp.c -o dfp.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include
[cp-testresults] FAIL: gcc build on Fri Mar 31 00:09:59 UTC 2006
/home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/loop-invariant.c -o loop-invariant.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/tree-ssa-loop-im.c -o tree-ssa-loop-im.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/debug.c -o debug.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/df-core.c -o df-core.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/df-problems.c -o df-problems.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/df-scan.c -o df-scan.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/dfp.c -o dfp.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include
[cp-testresults] FAIL: gcc build on Fri Mar 31 01:35:05 UTC 2006
/home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/loop-invariant.c -o loop-invariant.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/tree-ssa-loop-im.c -o tree-ssa-loop-im.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/debug.c -o debug.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/df-core.c -o df-core.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/df-problems.c -o df-problems.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/df-scan.c -o df-scan.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/dfp.c -o dfp.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include
[cp-testresults] FAIL: gcc build on Fri Mar 31 03:00:19 UTC 2006
/home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/loop-invariant.c -o loop-invariant.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/tree-ssa-loop-im.c -o tree-ssa-loop-im.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/debug.c -o debug.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/df-core.c -o df-core.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/df-problems.c -o df-problems.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/df-scan.c -o df-scan.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -g ../../trunk/gcc/dfp.c -o dfp.o /home/cpdev/Nightly/gcc/build/./prev-gcc/xgcc -B/home/cpdev/Nightly/gcc/build/./prev-gcc/ -B/home/cpdev/Nightly/gcc/install/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include
[cp-testresults] FAIL: regressions for libgcj on Fri Mar 31 07:34:30 UTC 2006
Baseline from: Thu Mar 30 19:01:15 UTC 2006 Regressions: FAIL: Thread_Sleep output - source compiled test New fails: Totals: PASS: 3432 XPASS: 4 FAIL: 1 XFAIL: 15 ___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
File.canWrite() actually writes stuff
Hi all, I just noticed that File.canWrite() actually writes things in order to check whether they are writable. This seems really wrong to me: just checking something should not modify the filesystem! Does anyone mind if I replace this? Cheers, Gary
Re: File.canWrite() actually writes stuff
Gary Benson writes: Hi all, I just noticed that File.canWrite() actually writes things in order to check whether they are writable. This seems really wrong to me: just checking something should not modify the filesystem! Does anyone mind if I replace this? I agree with you. We should just use access(file, W_OK). The gcj source I'm looking at has public boolean canWrite() { checkWrite(); return _access (WRITE); } which is correct, but the Classpath native code I'm looking at uses /* The lazy man's way out. We actually do open the file for writing briefly to verify it can be done */ TARGET_NATIVE_FILE_OPEN_READWRITE (filename, fd, result); (*env)-ReleaseStringUTFChars (env, name, filename); if (result != TARGET_NATIVE_OK) { return (0); } TARGET_NATIVE_FILE_CLOSE (fd, result); I can't see any code that actually writes anything. Andrew.
[Bug swing/26937] JMenuItem highlighting issue
--- Comment #1 from mark at gcc dot gnu dot org 2006-03-30 09:43 --- Confirmed. Can also be seen with the menus in the GNU Classpath Free Swing Demo. Going down a menu past the last item and then up again doesn't highlight the last item, but it can be selected. -- mark at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2006-03-30 09:43:45 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26937 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
[Bug swing/26342] During the editing session, the whole JTable is repainted each time the caret blinks.
--- Comment #2 from audriusa at bluewin dot ch 2006-03-30 09:47 --- Created an attachment (id=11163) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11163action=view) This is the transient patch to expose the problem AND NOT THE BUG FIX The problem is now largely fixed, and the number of the cells being repainted is reduced from the whole table till the 2 cells only: the cell being edited and the cell immediately below. At least the cell below should not be repainted: it is not modified. Hence the problem is now much less serious than before. I attach the modifying patch that can be transiently applied to expose the problem. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26342 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
[Bug swing/26342] During the editing session, the whole JTable is repainted each time the caret blinks.
--- Comment #3 from audriusa at bluewin dot ch 2006-03-30 09:50 --- Reducing severity to trivial and priority to P4, because the bug is partially fixed. Only one (maybe two) cells are currently repainted on the each keystroke and also on the each caret blink. -- audriusa at bluewin dot ch changed: What|Removed |Added Severity|minor |trivial Priority|P3 |P4 Last reconfirmed|2006-02-27 18:52:21 |2006-03-30 09:50:17 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26342 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
Re: File.canWrite() actually writes stuff
Andrew Haley wrote: Gary Benson writes: I just noticed that File.canWrite() actually writes things in order to check whether they are writable. This seems really wrong to me: just checking something should not modify the filesystem! Does anyone mind if I replace this? I agree with you. We should just use access(file, W_OK). The gcj source I'm looking at has public boolean canWrite() { checkWrite(); return _access (WRITE); } which is correct, but the Classpath native code I'm looking at uses /* The lazy man's way out. We actually do open the file for writing briefly to verify it can be done */ TARGET_NATIVE_FILE_OPEN_READWRITE (filename, fd, result); (*env)-ReleaseStringUTFChars (env, name, filename); if (result != TARGET_NATIVE_OK) { return (0); } TARGET_NATIVE_FILE_CLOSE (fd, result); I can't see any code that actually writes anything. That particular bit doesn't write any bytes, but it modifies the file's timestamp. If you look in VMFile.canWriteDirectory() you'll see some actual writing. Cheers, Gary
Re: Green threads - some experience
Ian Rogers wrote: The AWT peer problems were caused primarily by pthread mechanisms being used by GTK. These are wrapped in a library called gthreads. A Java thread would: 1) enter some native code that acquired a pthread mutex 2) call back into the JVM 3) the JVM would switch Java thread 4) the Java thread would call code that required the original mutex and block in native code not allowing other threads to get scheduled Hi, why didn't you modify GTK instead? Calling back into the JVM (with unpredictable consequences) whilst holding a pthread mutex is a bad idea. Cheers, Dave
Re: File.canWrite() actually writes stuff
Gary Benson writes: That particular bit doesn't write any bytes, but it modifies the file's timestamp. Ah, OK. Nasty. Andrew.
Re: Green threads - some experience
Ian Rogers writes: I think the long term view is to switch to POSIX threads. Having used the Jikes RVM for an OS like project, relying on native threads wouldn't have been desirable. In theory green thread context switches should be possible in a few instructions whereas a full context switch takes a few hundred. I guess its all down to the situation the JVM is trying to optimise for. Indeed. I've been thinking about this, and it occurs to me that threads are used to solve two entirely problems, and which threading model is desirable depends on which problem you are trying to solve. 1: How do I organize my program in such a way that it is easy to write/maintain/understand and runs fast on commodity hardware? 2: I can put a quarter of a billion transistors on a piece of silicon 200 square millimetres in size. How can I write my program in such a way that it uses all those transistors to best effect? I suspect that the answer to 1 is (or was) to have lightweight user-space threads and the answer to 2 is to use a (perhaps smaller) number of kernel threads. In particular, the issue of process affinity may be so important to solving Problem 2 that green threads aren't an answer. Also, if all but one of my processors are idling, a super-light context switch isn't any compensation. I believe that the general trend in commodity desktop hardware is towards multi-core / multi-thread processors, where good performance depends on the kernel's ability to manage processor allocation between threads. Because of this, green threads are a dead end. Of course, in real life there are many shades of grey between these two problems. But it does explain why in our exchanges we were so often talking at cross purposes: we were trying to solve different problems. Andrew.
RFC: Changing Class.newInstance() to add VM specific feature
Hi, I've added a new access modifier to IKVM. By applying the @ikvm.lang.Internal annotation to a type or member, you can mark it as internal to the library it resides in. Hopefully Java will provide something similar with JSR 277, but I've decided not to wait on that. To support this access level with reflection, I've modified Method/Constructor/Field (of which I include my own versions with IKVM, so that was easy), but I also need to modify Class.newInstance(). Would anybody object to adding a hook for this? It would look something like this: Index: java/lang/Class.java === RCS file: /cvsroot/classpath/classpath/java/lang/Class.java,v retrieving revision 1.43 diff -u -r1.43 Class.java --- java/lang/Class.java18 Dec 2005 13:03:48 - 1.43 +++ java/lang/Class.java30 Mar 2006 11:04:57 - @@ -1127,7 +1127,8 @@ (Modifier.isPrivate(modifiers) || getClassLoader() != caller.getClassLoader() || !getPackagePortion(getName()) -.equals(getPackagePortion(caller.getName() +.equals(getPackagePortion(caller.getName( + !VMClass.checkAccess(contructor, caller)) throw new IllegalAccessException(getName() + has an inaccessible constructor); } The vm/reference implementation of VMClass.checkAccess() would simply return false. Regards, Jeroen
Re: Green threads - some experience
Andrew Haley wrote: I think the long term view is to switch to POSIX threads. Having used the Jikes RVM for an OS like project, relying on native threads wouldn't have been desirable. In theory green thread context switches should be possible in a few instructions whereas a full context switch takes a few hundred. I guess its all down to the situation the JVM is trying to optimise for. Indeed. I've been thinking about this, and it occurs to me that threads are used to solve two entirely problems, and which threading model is desirable depends on which problem you are trying to solve. IMHO using POSIX threads is the only right answer for a multi-platform JVM. You have no other choice except to leave it up to the specific platform to then implement POSIX threads efficiently. For example, on Linux where each POSIX thread is a cloned process, it's Linux's fault (not the JVM's fault) if that doesn't scale well. For example, other OS's don't have such heavyweight threads. FreeBSD's KSE's are an example of a better tradeoff using M:N user:kernel threading. -Archie __ Archie Cobbs *CTO, Awarix* http://www.awarix.com
Re: Green threads - some experience
Ian == Ian Rogers [EMAIL PROTECTED] writes: Ian I'd just like to describe my experiences of getting m-to-n threading Ian going with classpath gtk peers and the Jikes RVM. It could possibly be Ian instructive for developers and/or other JVMs. Thanks for writing this. What do you think of putting it on the wiki or in the classpath vm integration guide? Maybe we could have a section on advice to VM implementors. Tom
jMemorize - exception in JTable code
Hi, I added jMemorize[0] to the list of Free Swing apps. I just stumbled over the app and tried to run it but it fails with a NPE: java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invokeNative (Native Method) at java.lang.reflect.Method.invoke (Method.java:355) at jamvm.java.lang.JarLauncher.main (JarLauncher.java:50) Caused by: java.lang.NullPointerException at jmemorize.gui.swing.CardTable.columnMarginChanged (Unknown Source) at javax.swing.table.DefaultTableColumnModel.fireColumnMarginChanged (DefaultTableColumnModel.java:493) at javax.swing.table.DefaultTableColumnModel.setColumnMargin (DefaultTableColumnModel.java:171) at javax.swing.JTable.setIntercellSpacing (JTable.java:2950) at javax.swing.JTable.initializeLocalVars (JTable.java:1720) at javax.swing.JTable.init (JTable.java:1664) at javax.swing.JTable.init (JTable.java:1582) at jmemorize.gui.swing.CardTable.init (Unknown Source) at jmemorize.gui.swing.FindFrame.init (Unknown Source) at jmemorize.gui.swing.MainFrame.init (Unknown Source) at jmemorize.core.Main.run (Unknown Source) at jmemorize.core.Main.main (Unknown Source) at java.lang.reflect.Method.invokeNative (Native Method) ...2 more Since there are some Swing hackers who frequently work on JTable this might be a low hanging fruit for them. cya Robert [0] - http://riad.de/jmemorize signature.asc Description: OpenPGP digital signature
[Bug awt/26925] Number formatter app does not format numbers properly.
--- Comment #1 from langel at redhat dot com 2006-03-30 18:51 --- Fixed. -- langel at redhat dot com changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26925 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
Re: jMemorize - exception in JTable code: Fixed, but JFreeChart internal problem follows.
This is because jMemorize overrides the JTable.columnMarginChanged that is fired from the JTable constructor, when the user - derived class is not yet initialised. This can be easily fixed by initialising the table column model befor the table listeners are installed on it, I have comitted such patch. Unfortunately, this brings us to the second exception, related to the JFreeChart: java.lang.ClassCastException: gnu/java/awt/peer/gtk/GdkGraphics at org.jfree.chart.ChartPanel.paintComponent (ChartPanel.java:905) at javax.swing.JComponent.paint (JComponent.java:1583) at javax.swing.JComponent.paintChildren (JComponent.java:1700) at javax.swing.JComponent.paint (JComponent.java:1585) at javax.swing.JComponent.paintChildren (JComponent.java:1700) at javax.swing.JSplitPane.paintChildren (JSplitPane.java:538) at javax.swing.JComponent.paint (JComponent.java:1585) at javax.swing.JComponent.paintChildren (JComponent.java:1700) at javax.swing.JComponent.paint (JComponent.java:1585) at javax.swing.JComponent.paintChildren (JComponent.java:1700) at javax.swing.JSplitPane.paintChildren (JSplitPane.java:538) at javax.swing.JComponent.paint (JComponent.java:1585) at javax.swing.JComponent.paintChildren (JComponent.java:1700) at javax.swing.JComponent.paint (JComponent.java:1585) at javax.swing.JComponent.paintChildren (JComponent.java:1700) at javax.swing.JComponent.paint (JComponent.java:1585) at javax.swing.JLayeredPane.paint (JLayeredPane.java:647) at javax.swing.JComponent.paintChildren (JComponent.java:1700) Probably our JFreeChart experts could look at this. Regards Audrius. Robert Schuster wrote: Hi, I added jMemorize[0] to the list of Free Swing apps. I just stumbled over the app and tried to run it but it fails with a NPE: java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invokeNative (Native Method) at java.lang.reflect.Method.invoke (Method.java:355) at jamvm.java.lang.JarLauncher.main (JarLauncher.java:50) Caused by: java.lang.NullPointerException at jmemorize.gui.swing.CardTable.columnMarginChanged (Unknown Source) at javax.swing.table.DefaultTableColumnModel.fireColumnMarginChanged (DefaultTableColumnModel.java:493) at javax.swing.table.DefaultTableColumnModel.setColumnMargin (DefaultTableColumnModel.java:171) at javax.swing.JTable.setIntercellSpacing (JTable.java:2950) at javax.swing.JTable.initializeLocalVars (JTable.java:1720) at javax.swing.JTable.init (JTable.java:1664) at javax.swing.JTable.init (JTable.java:1582) at jmemorize.gui.swing.CardTable.init (Unknown Source) at jmemorize.gui.swing.FindFrame.init (Unknown Source) at jmemorize.gui.swing.MainFrame.init (Unknown Source) at jmemorize.core.Main.run (Unknown Source) at jmemorize.core.Main.main (Unknown Source) at java.lang.reflect.Method.invokeNative (Native Method) ...2 more Since there are some Swing hackers who frequently work on JTable this might be a low hanging fruit for them. cya Robert [0] - http://riad.de/jmemorize
[Bug swing/26842] JTextArea with lineWrap=true - wrong caret behavior in 2nd line
--- Comment #1 from thebohemian at gmx dot net 2006-03-30 21:18 --- Debugging things is pretty slow but here is what I found out already: If one types: abcenter This will leave the WrappedPlainDocument with two LeafElements. The dump will look like: paragraph content [0,4][abc ] content [4,5][ ] Now while investigating the View instances I found out that the WrappedLine instance for the first line has the offsets 0 - 4 and for the second line it is 4 - 5. This is ok. After typing another char things will look like this: text: abc\nd (Cursor will stay before the 'd') document dump: paragraph content [0,4][abc ] content [4,6][a ] start and end offset of WrappedLine #0: 0 - 5 #1: 5 - 6 These numbers are obviously wrong. Since the first line has not changed the end offset for the first WrappedLine should be 4. The start offset for the second WrappedLine should be 4, too. As the WrappedLine instances are child view I suspect that they are not properly updated as a consequence of insertUpdate() calls. -- thebohemian at gmx dot net changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2006-03-30 21:18:57 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26842 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
[Bug swing/26842] JTextArea with lineWrap=true - wrong caret behavior in 2nd line
--- Comment #2 from thebohemian at gmx dot net 2006-03-30 21:20 --- Created an attachment (id=11170) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11170action=view) beanshell debugging script I use this script to investigate the instances aka debugging. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26842 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
[Bug awt/26952] New: applet does not respond to key events
http://www.geocities.com/SiliconValley/Park/9967/atari.html press 's' or 'r' on rubik's cube -- Summary: applet does not respond to key events Product: classpath Version: 0.90 Status: UNCONFIRMED Severity: normal Priority: P3 Component: awt AssignedTo: langel at redhat dot com ReportedBy: langel at redhat dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26952 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
[Bug awt/26952] applet does not respond to key events
-- langel at redhat dot com changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2006-03-30 21:32:41 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26952 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
[Bug awt/26952] applet does not respond to key events
--- Comment #1 from langel at redhat dot com 2006-03-30 21:36 --- applet at top of the page does not show up -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26952 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
[Bug awt/26953] Nothing loads on applet
-- langel at redhat dot com changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2006-03-30 21:44:15 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26953 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
Re: jMemorize - exception in JTable code: Fixed, but JFreeChart internal problem follows.
The ChartPanel class overrides paintComponent(Graphics) and casts the incoming Graphics object the Graphics2D subclass - this is very common in Swing apps as a way to gain access to Java2D features for drawing on Swing components. I'm almost certain that the Graphics object is guaranteed to be a Graphics2D instance, and the original method signature is maintained for backwards compatibility only, although this isn't mentioned in the API specification. The only reference I've been able to find is this one in the Java tutorial: http://java.sun.com/docs/books/tutorial/uiswing/14painting/practice.html I think many applications are going to fail on our implementation until we get good Graphics2D support into our JComponent (many custom look and feel implementations rely on it, for starters). Regards, Dave Audrius Meskauskas wrote: This is because jMemorize overrides the JTable.columnMarginChanged that is fired from the JTable constructor, when the user - derived class is not yet initialised. This can be easily fixed by initialising the table column model befor the table listeners are installed on it, I have comitted such patch. Unfortunately, this brings us to the second exception, related to the JFreeChart: java.lang.ClassCastException: gnu/java/awt/peer/gtk/GdkGraphics at org.jfree.chart.ChartPanel.paintComponent (ChartPanel.java:905) at javax.swing.JComponent.paint (JComponent.java:1583) at javax.swing.JComponent.paintChildren (JComponent.java:1700) at javax.swing.JComponent.paint (JComponent.java:1585) at javax.swing.JComponent.paintChildren (JComponent.java:1700) at javax.swing.JSplitPane.paintChildren (JSplitPane.java:538) at javax.swing.JComponent.paint (JComponent.java:1585) at javax.swing.JComponent.paintChildren (JComponent.java:1700) at javax.swing.JComponent.paint (JComponent.java:1585) at javax.swing.JComponent.paintChildren (JComponent.java:1700) at javax.swing.JSplitPane.paintChildren (JSplitPane.java:538) at javax.swing.JComponent.paint (JComponent.java:1585) at javax.swing.JComponent.paintChildren (JComponent.java:1700) at javax.swing.JComponent.paint (JComponent.java:1585) at javax.swing.JComponent.paintChildren (JComponent.java:1700) at javax.swing.JComponent.paint (JComponent.java:1585) at javax.swing.JLayeredPane.paint (JLayeredPane.java:647) at javax.swing.JComponent.paintChildren (JComponent.java:1700) Probably our JFreeChart experts could look at this. Regards Audrius. Robert Schuster wrote: Hi, I added jMemorize[0] to the list of Free Swing apps. I just stumbled over the app and tried to run it but it fails with a NPE: java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invokeNative (Native Method) at java.lang.reflect.Method.invoke (Method.java:355) at jamvm.java.lang.JarLauncher.main (JarLauncher.java:50) Caused by: java.lang.NullPointerException at jmemorize.gui.swing.CardTable.columnMarginChanged (Unknown Source) at javax.swing.table.DefaultTableColumnModel.fireColumnMarginChanged (DefaultTableColumnModel.java:493) at javax.swing.table.DefaultTableColumnModel.setColumnMargin (DefaultTableColumnModel.java:171) at javax.swing.JTable.setIntercellSpacing (JTable.java:2950) at javax.swing.JTable.initializeLocalVars (JTable.java:1720) at javax.swing.JTable.init (JTable.java:1664) at javax.swing.JTable.init (JTable.java:1582) at jmemorize.gui.swing.CardTable.init (Unknown Source) at jmemorize.gui.swing.FindFrame.init (Unknown Source) at jmemorize.gui.swing.MainFrame.init (Unknown Source) at jmemorize.core.Main.run (Unknown Source) at jmemorize.core.Main.main (Unknown Source) at java.lang.reflect.Method.invokeNative (Native Method) ...2 more Since there are some Swing hackers who frequently work on JTable this might be a low hanging fruit for them. cya Robert [0] - http://riad.de/jmemorize
Re: jMemorize - exception in JTable code: Fixed, but JFreeChart internal problem follows.
Regards, David Gilbert wrote: The ChartPanel class overrides paintComponent(Graphics) and casts the incoming Graphics object the Graphics2D subclass - this is very common in Swing apps as a way to gain access to Java2D features for drawing on Swing components. I'm almost certain that the Graphics object is guaranteed to be a Graphics2D instance, and the original method signature is maintained for backwards compatibility only, although this isn't mentioned in the API specification. The only reference I've been able to find is this one in the Java tutorial: http://java.sun.com/docs/books/tutorial/uiswing/14painting/practice.html There it is written you can cast the |Graphics| parameter into a |Graphics2D| object., and this is java.sun.com. Looks like documented behavior. Probably it is time to fill in the bug report. Audrius.
[commit-cp] classpath javax/swing/JTabbedPane.java ./ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Roman Kennke [EMAIL PROTECTED]06/03/30 12:15:52 Modified files: javax/swing: JTabbedPane.java . : ChangeLog Log message: 2006-03-30 Roman Kennke [EMAIL PROTECTED] * javax/swing/JTabbedPane.java (removeTabAt): Adjust selection correctly when removing a tab before the selected tab. Also remove the component from the container, not only the tab object. Repaint and revalidate the component after the removal. (removeAll): Set selection to -1 before removing the tabs. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/javax/swing/JTabbedPane.java.diff?tr1=1.34tr2=1.35r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6946tr2=1.6947r1=textr2=text
[commit-cp] classpath javax/swing/plaf/basic/BasicTextUI.ja...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Roman Kennke [EMAIL PROTECTED]06/03/30 12:38:28 Modified files: javax/swing/plaf/basic: BasicTextUI.java . : ChangeLog Log message: 2006-03-30 Roman Kennke [EMAIL PROTECTED] PR 26045 * javax/swing/plaf/basic/BasicTextUI.java (installKeyboardActions): Simply call getKeymap() and install this. (createKeymap): Reimplemented to fetch a keymap from the UIManager. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicTextUI.java.diff?tr1=1.75tr2=1.76r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6947tr2=1.6948r1=textr2=text
[commit-cp] classpath javax/swing/JTabbedPane.java ./ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Roman Kennke [EMAIL PROTECTED]06/03/30 14:53:15 Modified files: javax/swing: JTabbedPane.java . : ChangeLog Log message: 2006-03-30 Roman Kennke [EMAIL PROTECTED] * javax/swing/JTabbedPane.java (removeTabAt): Removed debug code. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/javax/swing/JTabbedPane.java.diff?tr1=1.35tr2=1.36r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6948tr2=1.6949r1=textr2=text
[commit-cp] classpath ChangeLog
CVSROOT:/sources/classpath Module name:classpath Branch: Changes by: Audrius Meskauskas [EMAIL PROTECTED] 06/03/30 18:24:45 Modified files: . : ChangeLog Log message: 2006-03-30 Audrius Meskauskas [EMAIL PROTECTED] Changelog: Fixed 2006-03-17 wrongly resolved conflict. See http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6794tr2=1.6795r1=textr2=text CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6949tr2=1.6950r1=textr2=text
[commit-cp] classpath ./ChangeLog gnu/java/awt/peer/gtk/Gdk...
CVSROOT:/sources/classpath Module name:classpath Branch: Changes by: Lillian Angel [EMAIL PROTECTED] 06/03/30 18:55:13 Modified files: . : ChangeLog gnu/java/awt/peer/gtk: GdkGraphics.java java/awt : Choice.java Log message: 2006-03-30 Lillian Angel [EMAIL PROTECTED] * gnu/java/awt/peer/gtk/GdkGraphics.java (drawImage): Added check to prevent NPE. (drawImage): Likewise. (drawImage): Likewise. * java/awt/Choice.java (dispatchEventImpl): New function. selectedIndex was not being updated properly otherwise. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6950tr2=1.6951r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/java/awt/peer/gtk/GdkGraphics.java.diff?tr1=1.54tr2=1.55r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/java/awt/Choice.java.diff?tr1=1.24tr2=1.25r1=textr2=text
[commit-cp] classpath ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Mark Wielaard [EMAIL PROTECTED] 06/03/30 22:36:03 Modified files: . : ChangeLog Log message: Fix PR number. PR 26848 * java/awt/Window.java (dispatchEventImpl): On ComponentEvents adjust bounds. On resize invalidate and validate container. Always pass on ComponentEvents to Container super class. * gnu/java/awt/peer/gtk/GtkFramePeer.java (setBounds): Adjust for menuBar and pass to GtkWindowPeer super class. (postConfigureEvent): Adjust menu bar width. Adjust y and height bounds and pass to GtkWindowPeer super class. * gnu/java/awt/peer/gtk/GtkWindowPeer.java (x, y, width, height): New fields for local bounds. (getX, getY): New methods. (getWidth): Don't call into awtComponent. (getHeight): Likewise. (create): Cache local bounds. (setLocation): Documented, made protected and just call nativeSetLocation. (setLocationUnlocked): Removed unused method. (setBoundsUnlocked): Likewise. (setBounds): Check whether bounds actually changed and cache local bounds. (setSize): Documented and made protected. (setResizable): Documented and cache local bounds. (postConfigureEvent): Update local bounds. Don't call awtComponent directly but post ComponentEvents. (show): Cache local bounds. (getBounds): Override to return cached bounds. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6954tr2=1.6955r1=textr2=text
[commit-cp] classpath ./ChangeLog javax/imageio/plugins/jpe...
CVSROOT:/sources/classpath Module name:classpath Branch: Changes by: Thomas Fitzsimmons [EMAIL PROTECTED] 06/03/31 02:07:31 Modified files: . : ChangeLog javax/imageio/plugins/jpeg: JPEGHuffmanTable.java Added files: javax/imageio/plugins/jpeg: JPEGQTable.java Log message: 2006-03-30 Thomas Fitzsimmons [EMAIL PROTECTED] * javax/imageio/plugins/jpeg/JPEGQTable.java: New file. * javax/imageio/plugins/jpeg/JPEGHuffmanTable.java (ACChrominanceLengths, ACChrominanceValues, ACLuminanceLengths, ACLuminanceValues, DCChrominanceLengths, DCChrominanceValues, DCLuminanceLengths, DCLuminanceValues): Remove fields. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6955tr2=1.6956r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java.diff?tr1=1.1tr2=1.2r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/javax/imageio/plugins/jpeg/JPEGQTable.java?rev=1.1
[commit-cp] classpath ./ChangeLog java/awt/geom/Point2D.java
CVSROOT:/sources/classpath Module name:classpath Branch: Changes by: David Gilbert [EMAIL PROTECTED] 06/03/31 03:21:44 Modified files: . : ChangeLog java/awt/geom : Point2D.java Log message: 2006-03-31 David Gilbert [EMAIL PROTECTED] Fixes bug #26955 * java/awt/geom/Point2D.java (distanceSq(double, double)): Fixed order of arguments, (distanceSq(Point2D)): Likewise, (distance(double, double)): Likewise, (distance(Point2D)): Likewise. -- CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6956tr2=1.6957r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/java/awt/geom/Point2D.java.diff?tr1=1.9tr2=1.10r1=textr2=text