[cp-patches] Re: FYI: GtkSelection.c LocalRef cleanup
On Tue, 2005-11-29 at 14:10 +0100, Mark Wielaard wrote: On Sat, 2005-11-26 at 14:19 +0100, Christian Thalinger wrote: The line where it's out of local refs is: #2 0x2b4f5c01 in clipboard_targets_received (clipboard=Variable clipboard is not available. ) at gnu_java_awt_peer_gtk_GtkSelection.c:106 But i don't know where it actually leaks the refs. Maybe someone else? I added a note to the bug. Will look into this. OK I looked, but couldn't find anything obvious. Would it be possible to print out a stacktrace and a list of the current Local Refs allocated at that point? Thanks, Mark ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] FYI: Getting the system clipboard in javax/swing/TransferHandler
Mark Wielaard wrote: On Sat, 2005-11-19 at 23:40 +0100, Meskauskas Audrius wrote: The idea probably is that if we cannot get access to the system clipboard, we may still want to cut/copy/paste inside the same application (for instance, to move the text fragment in the text area being currently edited). With the local clipboard, the application can only read the clipboard data that it have placed there itself. With the system clipboard, the application may have access on some data that are just accidently remaining there; it is probably possible to steal a valuable information this way. Yes. But the problem was that 1) whenever there was any insecure access to the clipboard all successive calls would use this local clipboard and 2) I am not sure it is really valuable to have (mutually?) insecure code (ex)change the information in a local clipboard. It does seem odd, I agree. I guess the burning question is what does Sun's JRE do?, since we probably ought to be doing the same. As an aside, caching the result of a SecurityManager check is probably something to avoid, and I'm glad to see it was removed in a later commit. (And as another aside, the best way to draw my attention to a thread is a direct mail with an exciting subject ;)) Cheers, Gary ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] [generics] Patch: FYI: generics cleanups
I'm checking this in on the generics branch. This genericizes a few methods I missed during the previous patches. I think for API genericization all that remains now is javax.imageio (I have a patch for this) and a few methods in java.util. Tom 2005-11-29 Tom Tromey [EMAIL PROTECTED] * javax/swing/text/StyleContext.java (removeAttributes): Genericized. (getAttributeNames): Likewise. * javax/swing/text/SimpleAttributeSet.java (getAttributeNames): Genericized. (removeAttributes): Likewise. * javax/swing/text/DefaultStyledDocument.java (getStyleNames): Genericized. * javax/swing/text/AbstractDocument.java (getAttributeNames): Genericized. (removeAttributes): Likewise. * javax/swing/table/TableColumnModel.java (getColumns): Genericized. * javax/swing/table/AbstractTableModel.java (getColumnClass): Genericized. * javax/swing/tree/VariableHeightLayoutCache.java (getVisiblePathsFrom): Genericized. * javax/swing/tree/FixedHeightLayoutCache.java (getVisiblePathsFrom): Genericized. * javax/swing/undo/StateEdit.java (postState): Genericized. (preState): Likewise. * javax/security/sasl/SaslServerFactory.java (createSaslServer): Genericized. * javax/security/sasl/SaslClientFactory.java (createSaslClient): Genericized. (getMechanismNames): Likewise. * javax/security/sasl/Sasl.java (createSaslClient): Genericized. (createSaslServer): Likewise. (getSaslClientFactories): Likewise. (getSaslServerFactories): Likewise. * javax/security/auth/spi/LoginModule.java (initialize): Genericized. * javax/security/auth/login/AppConfigurationEntry.java (AppConfigurationEntry): Genericized. (getOptions): Likewise. * javax/sql/RowSet.java (getTypeMap): Genericized. (setTypeMap): Likewise. * java/sql/Array.java (getResultSet): Genericized. * java/security/cert/X509CertSelector.java (getExtendedKeyUsage): Genericized. * java/security/Permissions.java (elements): Genericized. * java/rmi/server/RMIClassLoader.java (loadClass): Genericized. Index: java/rmi/server/RMIClassLoader.java === RCS file: /cvsroot/classpath/classpath/java/rmi/server/RMIClassLoader.java,v retrieving revision 1.10.2.5 diff -u -r1.10.2.5 RMIClassLoader.java --- java/rmi/server/RMIClassLoader.java 25 Nov 2005 22:50:47 - 1.10.2.5 +++ java/rmi/server/RMIClassLoader.java 29 Nov 2005 14:29:25 - @@ -102,7 +102,7 @@ * @throws MalformedURLException if the URL is not well formed * @throws ClassNotFoundException if the requested class cannot be found */ - public static Class loadClass(URL codeBase, String name) + public static Class? loadClass(URL codeBase, String name) throws MalformedURLException, ClassNotFoundException { RMIClassLoaderSpi spi = getProviderInstance(); Index: java/security/Permissions.java === RCS file: /cvsroot/classpath/classpath/java/security/Permissions.java,v retrieving revision 1.7.2.5 diff -u -r1.7.2.5 Permissions.java --- java/security/Permissions.java 2 Aug 2005 20:12:25 - 1.7.2.5 +++ java/security/Permissions.java 29 Nov 2005 14:29:25 - @@ -150,7 +150,7 @@ * * @return an codeEnumeration/code of this collection's elements */ - public Enumeration elements() + public EnumerationPermission elements() { return new Enumeration() { Index: java/security/cert/X509CertSelector.java === RCS file: /cvsroot/classpath/classpath/java/security/cert/X509CertSelector.java,v retrieving revision 1.4.2.5 diff -u -r1.4.2.5 X509CertSelector.java --- java/security/cert/X509CertSelector.java25 Nov 2005 22:18:19 - 1.4.2.5 +++ java/security/cert/X509CertSelector.java29 Nov 2005 14:29:25 - @@ -574,7 +574,7 @@ * * @return The set of key purpose OIDs (strings). */ - public Set getExtendedKeyUsage() + public SetString getExtendedKeyUsage() { if (keyPurposeSet != null) return Collections.unmodifiableSet(keyPurposeSet); Index: java/sql/Array.java === RCS file: /cvsroot/classpath/classpath/java/sql/Array.java,v retrieving revision 1.7.2.2 diff -u -r1.7.2.2 Array.java --- java/sql/Array.java 27 Nov 2005 15:24:16 - 1.7.2.2 +++ java/sql/Array.java 29 Nov 2005 14:29:25 - @@ -181,6 +181,6 @@ * @exception SQLException If an error occurs. * @see ResultSet */ - ResultSet getResultSet(long index, int count, Map map) + ResultSet getResultSet(long index, int count, MapString, Class? map) throws SQLException; } Index:
[cp-patches] Patch: More MetalFileChooserUI
Made changes so the details table uses a different panel from the list, as well as a different selection listener. 2005-11-29 Lillian Angel [EMAIL PROTECTED] * javax/swing/plaf/metal/MetalFileChooserUI.java (actionPerformed): Changed to update list with all selected intervals, and to use fileTablePanel instead. (actionPerformed): Likewise. (propertyChange): Changed to use addSelectionInterval instead of setSelectionInterval. (uninstallComponents): Uninstalled fileTablePanel. (installListeners): Moved code to createList, so listeners are installed for every list that may be created. (createList): Added code to remove and install listeners on list. (createDetailsView): Changed to use own panel. Also, added code to set the selection mode. Index: javax/swing/plaf/metal/MetalFileChooserUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalFileChooserUI.java,v retrieving revision 1.11 diff -u -r1.11 MetalFileChooserUI.java --- javax/swing/plaf/metal/MetalFileChooserUI.java 29 Nov 2005 21:12:35 - 1.11 +++ javax/swing/plaf/metal/MetalFileChooserUI.java 29 Nov 2005 22:22:37 - @@ -190,16 +190,19 @@ { if (!listView) { - int index = fileTable.getSelectedRow(); + int[] index = fileTable.getSelectedRows(); listView = true; JFileChooser fc = getFileChooser(); - fc.remove(fileListPanel); + fc.remove(fileTablePanel); fileListPanel = createList(fc); - - if (index = 0) -fileList.getSelectionModel().setSelectionInterval(index, index); - else -fileList.getSelectionModel().clearSelection(); + + fileList.getSelectionModel().clearSelection(); + if (index.length 0) +{ + + for (int i = 0; i index.length; i++) +fileList.getSelectionModel().addSelectionInterval(index[i], index[i]); +} fc.add(fileListPanel, BorderLayout.CENTER); fc.revalidate(); @@ -224,18 +227,24 @@ { if (listView) { - int index = fileList.getSelectedIndex(); + int[] index = fileList.getSelectedIndices(); JFileChooser fc = getFileChooser(); listView = false; fc.remove(fileListPanel); - fileListPanel = createDetailsView(fc); - if (index = 0) -fileTable.getSelectionModel().setSelectionInterval(index, index); + if (fileTable == null) +fileTablePanel = createDetailsView(fc); else -fileTable.getSelectionModel().clearSelection(); +updateTable(); + + fileTable.getSelectionModel().clearSelection(); + if (index.length 0) +{ + for (int i = 0; i index.length; i++) +fileTable.getSelectionModel().addSelectionInterval(index[i], index[i]); +} - fc.add(fileListPanel, BorderLayout.CENTER); + fc.add(fileTablePanel, BorderLayout.CENTER); fc.revalidate(); fc.repaint(); } @@ -298,7 +307,7 @@ } else { - fileTable.getSelectionModel().setSelectionInterval(index, index); + fileTable.getSelectionModel().addSelectionInterval(index, index); fileTable.scrollRectToVisible(fileTable.getCellRect(index, 0, true)); fileTable.revalidate(); fileTable.repaint(); else if (n.equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY)) @@ -1188,6 +1197,9 @@ /** The panel containing the file list. */ JPanel fileListPanel; + /** The panel containing the file table. */ + JPanel fileTablePanel; + /** The filter combo box model. */ private FilterComboBoxModel filterModel; @@ -1317,6 +1329,8 @@ fc.remove(bottomPanel); bottomPanel = null; fc.remove(fileListPanel); +fc.remove(fileTablePanel); +fileTablePanel = null; fileListPanel = null; fc.remove(topPanel); topPanel = null; @@ -1399,9 +1413,6 @@ doubleClickList = this.createDoubleClickListener(fc, fileList); singleClickList = new SingleClickListener(fileList); directoryComboBox.setAction(new DirectoryComboBoxAction()); -fileList.addListSelectionListener(listSelList); -fileList.addMouseListener(doubleClickList); -fileList.addMouseListener(singleClickList); fc.addPropertyChangeListener(filterModel); super.installListeners(fc); } @@ -1450,11 +1461,23 @@ protected JPanel createList(JFileChooser fc) { JPanel panel = new JPanel(new BorderLayout()); -fileList = new JList(getModel()); +if (fileList == null) + fileList = new JList(); +
Re: [cp-patches] FYI: javax.swing.text cleanup
On Wed, 2005-10-19 at 14:58 +, Roman Kennke wrote: Some cleanup for javax.swing.text. 2005-10-19 Roman Kennke [EMAIL PROTECTED] * javax/swing/text/AbstractDocument.java * javax/swing/text/AttributeSet.java * javax/swing/text/ComponentView.java * javax/swing/text/DefaultCaret.java * javax/swing/text/DefaultEditorKit.java * javax/swing/text/DefaultHighlighter.java * javax/swing/text/EditorKit.java * javax/swing/text/FieldView.java * javax/swing/text/FlowView.java * javax/swing/text/GlyphView.java * javax/swing/text/JTextComponent.java * javax/swing/text/LayoutQueue.java * javax/swing/text/PlainView.java * javax/swing/text/Segment.java * javax/swing/text/StyledDocument.java * javax/swing/text/html/HTMLEditorKit.java * javax/swing/text/html/HTMLFrameHyperlinkEvent.java * javax/swing/text/html/parser/DocumentParser.java Reformatted slightly. Filled emtpy blocks with comments. Fixed some slight API doc errors. Removed some unneeded imports. /Roman The changes to PlainView were more than just reformatting and docs, and were regressions that were then fixed on November 24 (message attached). Please keep the functional changes separate from reformatting patches. --Tony ---BeginMessage--- This patch fixes the PasswordView, so that the caret gets positioned correctly. The model-view mapping was previously done by the superclass, which provides a mapping based on the real content. However, the PasswordView needs to base this mapping on the echo character. Also I did some small cleanups in PlainView. 2005-11-24 Roman Kennke [EMAIL PROTECTED] * javax/swing/text/PasswordView.java (modelToView): Overridden to correctly map between model and view respecting the echo character. (viewToModel): Added FIXME to show that this method also needs to be adjusted like the above method. * javax/swing/text/PlainView.java (paint): Don't set the font here. This is already done in the text component's JComponent.getComponentGraphics() method. (damageLineRange): Only repaint the damaged rectangle. /Roman Index: javax/swing/text/PasswordView.java === RCS file: /cvsroot/classpath/classpath/javax/swing/text/PasswordView.java,v retrieving revision 1.7 diff -u -r1.7 PasswordView.java --- javax/swing/text/PasswordView.java 17 Aug 2005 19:59:35 - 1.7 +++ javax/swing/text/PasswordView.java 24 Nov 2005 20:36:15 - @@ -41,6 +41,7 @@ import java.awt.Color; import java.awt.FontMetrics; import java.awt.Graphics; +import java.awt.Rectangle; import java.awt.Shape; import javax.swing.JPasswordField; @@ -211,7 +212,10 @@ /** * Provides a mapping from the document model coordinate space to the * coordinate space of the view mapped to it. - * + * + * This method is overridden to provide a correct mapping with respect to the + * echo char and not to the real content. + * * @param pos - the position to convert = 0 * @param a - the allocated region to render into * @param b - typesafe enumeration to indicate bias to a position in the model. @@ -222,7 +226,35 @@ public Shape modelToView(int pos, Shape a, Position.Bias b) throws BadLocationException { -return super.modelToView(pos, a, b); +Shape newAlloc = adjustAllocation(a); + +// Ensure metrics are up-to-date. +updateMetrics(); + +// Get rectangle of the line containing position. +int lineIndex = getElement().getElementIndex(pos); +Rectangle rect = lineToRect(newAlloc, lineIndex); + +// Get the rectangle for position. +Element line = getElement().getElement(lineIndex); +int lineStart = line.getStartOffset(); +Segment segment = getLineBuffer(); +segment.array = new char[pos - lineStart]; +char echoChar = getEchoChar(); +for (int i = 0; i segment.array.length; ++i) + segment.array[i] = echoChar; +segment.offset = 0; +segment.count = segment.array.length; + +int xoffset = Utilities.getTabbedTextWidth(segment, metrics, rect.x, + this, lineStart); + +// Calc the real rectangle. +rect.x += xoffset; +rect.width = 1; +rect.height = metrics.getHeight(); + +return rect; } /** @@ -239,6 +271,8 @@ */ public int viewToModel(float fx, float fy, Shape a, Position.Bias[] bias) { +// FIXME: This only provides a view-model mapping for the real text +// content and does not respect the echo char. return super.viewToModel(fx, fy, a, bias); } } Index: javax/swing/text/PlainView.java === RCS file: /cvsroot/classpath/classpath/javax/swing/text/PlainView.java,v retrieving revision 1.33 diff -u -r1.33 PlainView.java ---
[cp-patches] FYI: some methods in SystemFlavorMap implemented
I implemented some additional mapping methods in SystemFlavorMap. Now almost all prerequisites for the major getter/setter methods are present. 2005-11-30 Jan Roehrich [EMAIL PROTECTED] * java/awt/datatransfer/SystemFlavorMap.java (isJavaMIMEType): implemented. (GNU_JAVA_MIME_PREFIX): added constant. (decodeJavaMIMEType): implemented. (encodeJavaMIMEType): implemented. (encodeDataFlavor): implemented. Index: SystemFlavorMap.java === RCS file: /cvsroot/classpath/classpath/java/awt/datatransfer/SystemFlavorMap.java,v retrieving revision 1.9 diff -u -r1.9 SystemFlavorMap.java --- SystemFlavorMap.java 30 Nov 2005 00:59:57 - 1.9 +++ SystemFlavorMap.java 30 Nov 2005 01:44:52 - @@ -62,6 +62,11 @@ private static final Map systemFlavorMaps = new WeakHashMap(); /** + * Constant which is used to prefix encode Java MIME types. + */ + private static final String GNU_JAVA_MIME_PREFIX = gnu.java:; + + /** * This map maps native codeString/codes to lists of * codeDataFlavor/codes */ @@ -72,7 +77,7 @@ * codeString/codes */ private HashMap flavorToNativeMap = new HashMap(); - + /** * Private constructor. */ @@ -141,36 +146,90 @@ } /** - * Returns the native type name for the given java mime type. + * Encodes a MIME type for use as a codeString/code native. The format + * of an encoded representation of a MIME type is implementation-dependent. + * The only restrictions are: + * ul + * liThe encoded representation is codenull/code if and only if the + * MIME type codeString/code is codenull/code./li + * liThe encoded representations for two non-codenull/code MIME type + * codeString/codes are equal if and only if these codeString/codes + * are equal according to codeString.equals(Object)/code./li + * /ul + * p + * The present implementation of this method returns the specified MIME + * type codeString/code prefixed with codegnu.java:/code. + * + * @param mime the MIME type to encode + * @return the encoded codeString/code, or codenull/code if + * mimeType is codenull/code */ public static String encodeJavaMIMEType (String mime) { -return null; +if (mime != null) + return GNU_JAVA_MIME_PREFIX + mime; +else + return null; } /** - * Returns the native type name for the given data flavor. + * Encodes a codeDataFlavor/code for use as a codeString/code + * native. The format of an encoded codeDataFlavor/code is + * implementation-dependent. The only restrictions are: + * ul + * liThe encoded representation is codenull/code if and only if the + * specified codeDataFlavor/code is codenull/code or its MIME type + * codeString/code is codenull/code./li + * liThe encoded representations for two non-codenull/code + * codeDataFlavor/codes with non-codenull/code MIME type + * codeString/codes are equal if and only if the MIME type + * codeString/codes of these codeDataFlavor/codes are equal + * according to codeString.equals(Object)/code./li + * /ul + * p + * The present implementation of this method returns the MIME type + * codeString/code of the specified codeDataFlavor/code prefixed + * with codegnu.java:/code. + * + * @param df the codeDataFlavor/code to encode + * @return the encoded codeString/code, or codenull/code if + * flav is codenull/code or has a codenull/code MIME type */ public static String encodeDataFlavor (DataFlavor df) { -return null; +if (df != null) + { +return encodeJavaMIMEType(df.getMimeType()); + } +else + return null; } /** * Returns true if the native type name can be represented as - * a java mime type. + * a java mime type. Returns codefalse/code if parameter is + * codenull/code. */ public static boolean isJavaMIMEType (String name) { -return false; +return (name != null name.startsWith(GNU_JAVA_MIME_PREFIX)); } /** - * Returns the java mime type for the given the native type name. + * Decodes a codeString/code native for use as a Java MIME type. + * + * @param name the codeString/code to decode + * @return the decoded Java MIME type, or codenull/code if nat + * is not an encoded codeString/code native */ public static String decodeJavaMIMEType (String name) { -return null; +if (isJavaMIMEType(name)) + { +return name.substring(GNU_JAVA_MIME_PREFIX.length()); + } +else + return null; } /** @@ -188,6 +247,20 @@ return null; } + /** + * Returns a List of codeDataFlavors/code to which the specified + * codeString/code native can be translated by the data transfer + * subsystem. The codeList/code will be sorted from best + * codeDataFlavor/code to worst. That is, the first codeDataFlavor + * /code will
[cp-patches] Patch: MetalFileChooserUI
MetalFileChooserUI is pretty much completed now. I am still testing it for any remaining bugs. The sizing is still off in some cases, since the bug for wrapping JLists is not fixed (the wrapping code is temporarily commented out). The details view works. Editing in all views also works. 2005-11-29 Lillian Angel [EMAIL PROTECTED] * javax/swing/JViewport.java (setView): Added check to prevent NPE. * javax/swing/plaf/basic/BasicFileChooserUI.java (ListLabelRenderer): Removed class, never used. * javax/swing/plaf/metal/MetalFileChooserUI.java (DetailTableModel): Removed, not needed. (TableFileRenderer): Implemented to override some color and icon defaults in the default table renderer. (actionPerformed): Set selection in list, if something was selected in the table. (actionPerformed): Set selection in table, if something was selected in the list. (propertyChange): Added code to set the selection for the table, as well as the list. This depends on what view we are in. (editFile): Fixed to call scrollRectToVisible instead. (TableClickListener): Implemented new private class to take care of double clicking (changing/opening directories/files) and single clicking (editing). (TableClickListener.mouseClicked): Implemented (TableClickListener.editFile): Implemented (TableClickListener.completeEditing): Implemented (TableClickListener.EditingActionListener): Implemented (TableClickListener.closeDialog): Implemented (installListeners): Added code to initialize listener fields. (uninstallListeners): Added code to uninstall all listeners. (createList): Changed to use scrollPane field. (createDetailsView): Changed to use updateTable function. Set some characteristics for the table: column selection, renderer, listener etc. (updateTable): Implemented to changed/add/remove rows from the table, as needed. (removeControlButtons): Added repaint, revalidate calls. (ensureFileIsVisible): Removed. Does the same thing as super. (rescanCurrentDirectory): Added check for different views. (setDirectorySelected): Removed. Does the same thing as super. (getDirectoryName): Removed. Does the same thing as super. (setDirectoryName): Removed. Does the same thing as super. (valueChanged): Changed comment. Index: javax/swing/JViewport.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JViewport.java,v retrieving revision 1.36 diff -u -r1.36 JViewport.java --- javax/swing/JViewport.java 21 Nov 2005 13:33:06 - 1.36 +++ javax/swing/JViewport.java 29 Nov 2005 20:04:55 - @@ -424,8 +424,9 @@ public void setView(Component v) { -if (viewListener != null) - getView().removeComponentListener(viewListener); +Component currView = getView(); +if (viewListener != null currView != null) + currView.removeComponentListener(viewListener); if (v != null) { Index: javax/swing/plaf/basic/BasicFileChooserUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicFileChooserUI.java,v retrieving revision 1.19 diff -u -r1.19 BasicFileChooserUI.java --- javax/swing/plaf/basic/BasicFileChooserUI.java 25 Nov 2005 16:33:23 - 1.19 +++ javax/swing/plaf/basic/BasicFileChooserUI.java 29 Nov 2005 20:04:55 - @@ -58,14 +58,10 @@ import javax.swing.JComponent; import javax.swing.JDialog; import javax.swing.JFileChooser; -import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JTextField; -import javax.swing.ListCellRenderer; -import javax.swing.SwingConstants; import javax.swing.SwingUtilities; -import javax.swing.Timer; import javax.swing.UIDefaults; import javax.swing.UIManager; import javax.swing.event.ListSelectionEvent; @@ -722,46 +718,6 @@ private UpdateAction updateAction; // -- end private -- - private class ListLabelRenderer extends JLabel implements ListCellRenderer - { -/** DOCUMENT ME! */ -final Color selected = new Color(153, 204, 255); - -/** - * Creates a new ListLabelRenderer object. - */ -public ListLabelRenderer() -{ - super(); - setOpaque(true); -} - -/** - * DOCUMENT ME! - * - * @param list DOCUMENT ME! - * @param value DOCUMENT ME! - * @param index DOCUMENT ME! - * @param isSelected DOCUMENT ME! - * @param cellHasFocus DOCUMENT ME! - * - * @return DOCUMENT ME! - */ -public Component getListCellRendererComponent(JList list, Object value, - int index, - boolean isSelected, -
Re: mauve comparison with tgolem
Hi Edwin, On Mon, 2005-11-28 at 14:54 +0100, Edwin Steiner wrote: On Sat, Nov 26, 2005 at 02:01:53AM +0100, Mark Wielaard wrote: If it is in addition to what there is now already just the plain FAIL lines would be ideal to have. No extras, just the facts! :) You can now get a text-only list of common mauve fails at: http://www.complang.tuwien.ac.at/cacaojvm//tgolem/latest/mauve_common_fails.txt Very interesting list. Thanks. Quick analysis for those test that I know why they fail. Maybe others can take a look at the failures and quickly see whether there is a simple explanation or not for these failures. FAIL: gnu.testlet.java.io.File.newFile: getname returns the argument (number 3) Strange... I highly suspect that PlatformHelper is to blame since it tries to bridge any windows vs posix style file path issues. In practice is seems to fail miserably however... FAIL: gnu.testlet.java.lang.Character.classify12 (number 1) FAIL: gnu.testlet.java.lang.Character.getType (number 11) FAIL: gnu.testlet.java.lang.Character.getType (number 20) FAIL: gnu.testlet.java.lang.Character.getType (number 22) These fail because GNU Classpath provides Character based on a newer version of Unicode then what is being tested in Mauve. FAIL: gnu.testlet.java.lang.Package.getPackage: checking package for 'java.lang' (number 1) Needs runtime support. See NEWS file: * Changed implementation of VMClassLoader.getPackage(s) : new method VMClassLoader.getBootPackages should be implemented by the vm, and sould return a string array of boot package names (java.lang, java.net, ...). Feedback from vm implementors for usability and relevance of the getBootPackages method would be greatly appreciated. FAIL: gnu.testlet.java.nio.channels.FileChannel.map (number 1) Seems like a real bug, but fixing it (throwing the right exception) seems to trigger another bug. Needs investigation. FAIL: uncaught exception loading gnu.testlet.java.lang.Class.pkg.test1: java.lang.IllegalAccessException: gnu.testlet.java.lang.Class.pkg.test1 has an inaccessible constructor FAIL: uncaught exception loading gnu.testlet.java.lang.Class.pkg.test3: java.lang.IllegalAccessException: gnu.testlet.java.lang.Class.pkg.test3 has an inaccessible constructor FAIL: uncaught exception loading gnu.testlet.java.lang.Class.pkg.test4: java.lang.IllegalAccessException: gnu.testlet.java.lang.Class.pkg.test4 has an inaccessible constructor These are not tests and should be marked as such. I'll submit a patch. FAIL: uncaught exception loading gnu.testlet.java.lang.Number.NewNumber: java.lang.IllegalAccessException: gnu.testlet.java.lang.Number.NewNumber has an inaccessible constructor FAIL: uncaught exception loading gnu.testlet.java.lang.reflect.Other: java.lang.IllegalAccessException: gnu.testlet.java.lang.reflect.Other has an inaccessible constructor Likewise. Hopefully we can analyze the others also in the near future. Comments and suggestions appreciated. Cheers, Mark ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
Duplicate object prevention policy
Hello list, imagine the following case: A method supports the lookup of objects using a name - object mapping. The objects are stored in a map but can easily be newly created instead of performing a real lookup. Shall we perform this real lookup even if the newly created object is equal to the original object in terms of Object.equals(). Concrete?: Have a look at java.awt.datatransfer.SystemFlavorMap#decodeDataFlavor(). This is only one appearance of this problem (out of many many). Jan signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
Re: Duplicate object prevention policy
Jan Röhrich wrote: Hello list, imagine the following case: A method supports the lookup of objects using a name - object mapping. The objects are stored in a map but can easily be newly created instead of performing a real lookup. Shall we perform this real lookup even if the newly created object is equal to the original object in terms of Object.equals(). The theoretical answer depends on lots of things, such as: 1) the probable number of times that the method will be called, 2) the likelihood that the lookup (if implemented) will succeed, 3) the cost of creating the object, 4) the cost of the name lookup is, 5) the incremental GC cost if duplicate copies of the object become garbage, 6) the incremental GC cost if the mapping data structure keeps otherwise garbage objects alive, 7) the incremental GC cost if the application keeps duplicate copies of the objects alive, 8) the (speculative) cost of using obj.equals(obj2) versus obj == obj2 if we could guarantee that objects are ONLY created via the method, 9) etcetera And all of these depend on the nature of the objects and the way that they are used in a typical application. In short, there are no general answers. -- Steve ___ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath
[commit-cp] classpath javax/security/sasl/SaslServerFactory... [generics-branch]
CVSROOT:/cvsroot/classpath Module name:classpath Branch: generics-branch Changes by: Tom Tromey [EMAIL PROTECTED] 05/11/29 14:50:55 Modified files: javax/security/sasl: SaslServerFactory.java Sasl.java SaslClientFactory.java javax/swing/tree: FixedHeightLayoutCache.java VariableHeightLayoutCache.java java/sql : Array.java javax/swing/text: DefaultStyledDocument.java StyleContext.java SimpleAttributeSet.java AbstractDocument.java . : ChangeLog javax/swing/table: TableColumnModel.java AbstractTableModel.java java/security/cert: X509CertSelector.java java/rmi/server: RMIClassLoader.java javax/swing/undo: StateEdit.java javax/security/auth/login: AppConfigurationEntry.java javax/sql : RowSet.java javax/security/auth/spi: LoginModule.java java/security : Permissions.java Log message: * javax/swing/text/StyleContext.java (removeAttributes): Genericized. (getAttributeNames): Likewise. * javax/swing/text/SimpleAttributeSet.java (getAttributeNames): Genericized. (removeAttributes): Likewise. * javax/swing/text/DefaultStyledDocument.java (getStyleNames): Genericized. * javax/swing/text/AbstractDocument.java (getAttributeNames): Genericized. (removeAttributes): Likewise. * javax/swing/table/TableColumnModel.java (getColumns): Genericized. * javax/swing/table/AbstractTableModel.java (getColumnClass): Genericized. * javax/swing/tree/VariableHeightLayoutCache.java (getVisiblePathsFrom): Genericized. * javax/swing/tree/FixedHeightLayoutCache.java (getVisiblePathsFrom): Genericized. * javax/swing/undo/StateEdit.java (postState): Genericized. (preState): Likewise. * javax/security/sasl/SaslServerFactory.java (createSaslServer): Genericized. * javax/security/sasl/SaslClientFactory.java (createSaslClient): Genericized. (getMechanismNames): Likewise. * javax/security/sasl/Sasl.java (createSaslClient): Genericized. (createSaslServer): Likewise. (getSaslClientFactories): Likewise. (getSaslServerFactories): Likewise. * javax/security/auth/spi/LoginModule.java (initialize): Genericized. * javax/security/auth/login/AppConfigurationEntry.java (AppConfigurationEntry): Genericized. (getOptions): Likewise. * javax/sql/RowSet.java (getTypeMap): Genericized. (setTypeMap): Likewise. * java/sql/Array.java (getResultSet): Genericized. * java/security/cert/X509CertSelector.java (getExtendedKeyUsage): Genericized. * java/security/Permissions.java (elements): Genericized. * java/rmi/server/RMIClassLoader.java (loadClass): Genericized. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/security/sasl/SaslServerFactory.java.diff?only_with_tag=generics-branchtr1=1.3.2.5tr2=1.3.2.6r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/security/sasl/Sasl.java.diff?only_with_tag=generics-branchtr1=1.3.2.5tr2=1.3.2.6r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/security/sasl/SaslClientFactory.java.diff?only_with_tag=generics-branchtr1=1.3.2.4tr2=1.3.2.5r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/tree/FixedHeightLayoutCache.java.diff?only_with_tag=generics-branchtr1=1.2.2.2tr2=1.2.2.3r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/tree/VariableHeightLayoutCache.java.diff?only_with_tag=generics-branchtr1=1.2.2.2tr2=1.2.2.3r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/sql/Array.java.diff?only_with_tag=generics-branchtr1=1.7.2.2tr2=1.7.2.3r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/text/DefaultStyledDocument.java.diff?only_with_tag=generics-branchtr1=1.1.2.7tr2=1.1.2.8r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/text/StyleContext.java.diff?only_with_tag=generics-branchtr1=1.2.2.8tr2=1.2.2.9r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/text/SimpleAttributeSet.java.diff?only_with_tag=generics-branchtr1=1.5.2.7tr2=1.5.2.8r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/text/AbstractDocument.java.diff?only_with_tag=generics-branchtr1=1.9.2.13tr2=1.9.2.14r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?only_with_tag=generics-branchtr1=1.2386.2.180tr2=1.2386.2.181r1=textr2=text
[commit-cp] classpath ./ChangeLog java/net/URL.java
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Tom Tromey [EMAIL PROTECTED] 05/11/29 18:17:46 Modified files: . : ChangeLog java/net : URL.java Log message: PR classpath/25141: * java/net/URL.java (URL): Use context's stream handler. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5742tr2=1.5743r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/URL.java.diff?tr1=1.49tr2=1.50r1=textr2=text
[commit-cp] classpath ./ChangeLog javax/swing/text/DefaultF...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Anthony Balkissoon [EMAIL PROTECTED] 05/11/29 20:00:34 Modified files: . : ChangeLog Added files: javax/swing/text: DefaultFormatterFactory.java Log message: 2005-11-29 Anthony Balkissoon [EMAIL PROTECTED] * javax/swing/text/DefaultFormatterFactory.java: New class. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5743tr2=1.5744r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/text/DefaultFormatterFactory.java?rev=1.1
[commit-cp] classpath ./ChangeLog javax/swing/JViewport.jav...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Lillian Angel [EMAIL PROTECTED] 05/11/29 20:22:12 Modified files: . : ChangeLog javax/swing: JViewport.java javax/swing/plaf/basic: BasicFileChooserUI.java javax/swing/plaf/metal: MetalFileChooserUI.java Log message: 2005-11-29 Lillian Angel [EMAIL PROTECTED] * javax/swing/JViewport.java (setView): Added check to prevent NPE. * javax/swing/plaf/basic/BasicFileChooserUI.java (ListLabelRenderer): Removed class, never used. * javax/swing/plaf/metal/MetalFileChooserUI.java (DetailTableModel): Removed, not needed. (TableFileRenderer): Implemented to override some color and icon defaults in the default table renderer. (actionPerformed): Set selection in list, if something was selected in the table. (actionPerformed): Set selection in table, if something was selected in the list. (propertyChange): Added code to set the selection for the table, as well as the list. This depends on what view we are in. (editFile): Fixed to call scrollRectToVisible instead. (TableClickListener): Implemented new private class to take care of double clicking (changing/opening directories/files) and single clicking (editing). (TableClickListener.mouseClicked): Implemented (TableClickListener.editFile): Implemented (TableClickListener.completeEditing): Implemented (TableClickListener.EditingActionListener): Implemented (TableClickListener.closeDialog): Implemented (installListeners): Added code to initialize listener fields. (uninstallListeners): Added code to uninstall all listeners. (createList): Changed to use scrollPane field. (createDetailsView): Changed to use updateTable function. Set some characteristics for the table: column selection, renderer, listener etc. (updateTable): Implemented to changed/add/remove rows from the table, as needed. (removeControlButtons): Added repaint, revalidate calls. (ensureFileIsVisible): Removed. Does the same thing as super. (rescanCurrentDirectory): Added check for different views. (setDirectorySelected): Removed. Does the same thing as super. (getDirectoryName): Removed. Does the same thing as super. (setDirectoryName): Removed. Does the same thing as super. (valueChanged): Changed comment. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5744tr2=1.5745r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JViewport.java.diff?tr1=1.36tr2=1.37r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicFileChooserUI.java.diff?tr1=1.19tr2=1.20r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/metal/MetalFileChooserUI.java.diff?tr1=1.9tr2=1.10r1=textr2=text
[commit-cp] classpath ./ChangeLog javax/swing/plaf/metal/Me...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Lillian Angel [EMAIL PROTECTED] 05/11/29 21:12:35 Modified files: . : ChangeLog javax/swing/plaf/metal: MetalFileChooserUI.java Log message: 2005-11-29 Lillian Angel [EMAIL PROTECTED] * javax/swing/plaf/metal/MetalFileChooserUI.java (mouseClicked): Fixed checks to prevent NPE. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5745tr2=1.5746r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/metal/MetalFileChooserUI.java.diff?tr1=1.10tr2=1.11r1=textr2=text
[commit-cp] classpath ./ChangeLog javax/swing/plaf/metal/Me...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Lillian Angel [EMAIL PROTECTED] 05/11/29 22:30:21 Modified files: . : ChangeLog javax/swing/plaf/metal: MetalFileChooserUI.java Log message: 2005-11-29 Lillian Angel [EMAIL PROTECTED] * javax/swing/plaf/metal/MetalFileChooserUI.java (actionPerformed): Changed to update list with all selected intervals, and to use fileTablePanel instead. (actionPerformed): Likewise. (propertyChange): Changed to use addSelectionInterval instead of setSelectionInterval. (uninstallComponents): Uninstalled fileTablePanel. (installListeners): Moved code to createList, so listeners are installed for every list that may be created. (createList): Added code to remove and install listeners on list. (createDetailsView): Changed to use own panel. Also, added code to set the selection mode. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5746tr2=1.5747r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/metal/MetalFileChooserUI.java.diff?tr1=1.11tr2=1.12r1=textr2=text
[commit-cp] classpath ./ChangeLog java/awt/datatransfer/Sys...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Jan Roehrich [EMAIL PROTECTED]05/11/30 00:59:57 Modified files: . : ChangeLog java/awt/datatransfer: SystemFlavorMap.java Log message: 2005-11-30 Jan Roehrich [EMAIL PROTECTED] * java/awt/datatransfer/SystemFlavorMap.java Some minor codestyle fixes. (nativeToFlavorMap): removed generalization. (flavorToNativeMap): likewise. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5747tr2=1.5748r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/awt/datatransfer/SystemFlavorMap.java.diff?tr1=1.8tr2=1.9r1=textr2=text
[commit-cp] classpath ./ChangeLog java/awt/datatransfer/Sys...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Jan Roehrich [EMAIL PROTECTED]05/11/30 01:46:47 Modified files: . : ChangeLog java/awt/datatransfer: SystemFlavorMap.java Log message: 2005-11-30 Jan Roehrich [EMAIL PROTECTED] * java/awt/datatransfer/SystemFlavorMap.java (isJavaMIMEType): implemented. (GNU_JAVA_MIME_PREFIX): added constant. (decodeJavaMIMEType): implemented. (encodeJavaMIMEType): implemented. (encodeDataFlavor): implemented. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5748tr2=1.5749r1=textr2=text http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/awt/datatransfer/SystemFlavorMap.java.diff?tr1=1.9tr2=1.10r1=textr2=text