--- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java Fri May 16 04:37:47 2008 -0700
@@ -97,14 +97,11 @@
private static final Dimension hstrut3 = new Dimension(3, 1);
private static final Dimension vstrut10 = new Dimension(1, 10);
- private static final Insets insets = new Insets(10, 10, 10, 10);
-
private static Dimension prefListSize = new Dimension(75, 150);
private static Dimension PREF_SIZE = new Dimension(435, 360);
private static Dimension MIN_SIZE = new Dimension(200, 300);
- private static Dimension PREF_ACC_SIZE = new Dimension(10, 10);
private static Dimension ZERO_ACC_SIZE = new Dimension(1, 1);
private static Dimension MAX_SIZE = new Dimension(Short.MAX_VALUE, Short.MAX_VALUE);
@@ -125,7 +122,6 @@
private JPanel bottomButtonPanel;
private GTKDirectoryModel model = null;
private Action newFolderAction;
- private JPanel interior;
private boolean readOnly;
private boolean showDirectoryIcons;
private boolean showFileIcons;
@@ -710,15 +706,19 @@
bottomButtonPanel.setName("GTKFileChooser.bottomButtonPanel");
align(bottomButtonPanel);
+ JPanel pnButtons = new JPanel(new GridLayout(1, 2, 5, 0));
+
JButton cancelButton = getCancelButton(fc);
align(cancelButton);
cancelButton.setMargin(buttonMargin);
- bottomButtonPanel.add(cancelButton);
+ pnButtons.add(cancelButton);
- JButton approveButton = getApproveButton(fc);;
+ JButton approveButton = getApproveButton(fc);
align(approveButton);
approveButton.setMargin(buttonMargin);
- bottomButtonPanel.add(approveButton);
+ pnButtons.add(approveButton);
+
+ bottomButtonPanel.add(pnButtons);
if (fc.getControlButtonsAreShown()) {
fc.add(bottomButtonPanel, BorderLayout.SOUTH);
@@ -1108,7 +1108,7 @@
// Get the canonical (full) path. This has the side
// benefit of removing extraneous chars from the path,
// for example /foo/bar/ becomes /foo/bar
- File canonical = null;
+ File canonical;
try {
canonical = fsv.createFileObject(ShellFolder.getNormalizedFile(directory).getPath());
} catch (IOException e) {
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java Fri May 16 04:37:47 2008 -0700
@@ -982,7 +982,7 @@
"LEFT", "positiveUnitIncrement",
"KP_LEFT", "positiveUnitIncrement",
}),
-
+ "Slider.onlyLeftMouseButtonDrag", Boolean.FALSE,
"Spinner.ancestorInputMap",
new UIDefaults.LazyInputMap(new Object[] {
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java Fri May 16 04:37:47 2008 -0700
@@ -225,15 +225,15 @@
if(b.getIcon() != null) {
Icon icon;
if(!model.isEnabled()) {
- icon = (Icon) b.getDisabledIcon();
+ icon = b.getDisabledIcon();
} else if(model.isPressed() && model.isArmed()) {
- icon = (Icon) b.getPressedIcon();
+ icon = b.getPressedIcon();
if(icon == null) {
// Use default icon
- icon = (Icon) b.getIcon();
+ icon = b.getIcon();
}
} else {
- icon = (Icon) b.getIcon();
+ icon = b.getIcon();
}
if (icon!=null) {
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java Fri May 16 04:37:47 2008 -0700
@@ -86,18 +86,18 @@
protected void assembleSystemMenu() {
systemMenu = new JPopupMenu();
- JMenuItem mi = (JMenuItem)systemMenu.add(new JMenuItem(restoreAction));
+ JMenuItem mi = systemMenu.add(new JMenuItem(restoreAction));
mi.setMnemonic('R');
- mi = (JMenuItem) systemMenu.add(new JMenuItem(moveAction));
+ mi = systemMenu.add(new JMenuItem(moveAction));
mi.setMnemonic('M');
- mi = (JMenuItem) systemMenu.add(new JMenuItem(sizeAction));
+ mi = systemMenu.add(new JMenuItem(sizeAction));
mi.setMnemonic('S');
- mi = (JMenuItem) systemMenu.add(new JMenuItem(iconifyAction));
+ mi = systemMenu.add(new JMenuItem(iconifyAction));
mi.setMnemonic('n');
- mi = (JMenuItem) systemMenu.add(new JMenuItem(maximizeAction));
+ mi = systemMenu.add(new JMenuItem(maximizeAction));
mi.setMnemonic('x');
systemMenu.add(new JSeparator());
- mi = (JMenuItem) systemMenu.add(new JMenuItem(closeAction));
+ mi = systemMenu.add(new JMenuItem(closeAction));
mi.setMnemonic('C');
systemButton = new SystemButton();
@@ -157,7 +157,7 @@
}
public void propertyChange(PropertyChangeEvent evt) {
- String prop = (String)evt.getPropertyName();
+ String prop = evt.getPropertyName();
JInternalFrame f = (JInternalFrame)evt.getSource();
boolean value = false;
if (JInternalFrame.IS_SELECTED_PROPERTY.equals(prop)) {
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java Fri May 16 04:37:47 2008 -0700
@@ -290,7 +290,7 @@
Object unselectedTabBackground = new UIDefaults.LazyValue() {
public Object createValue(UIDefaults table) {
- Color c = (Color)table.getColor("control");
+ Color c = table.getColor("control");
return new ColorUIResource(Math.max((int)(c.getRed()*.85),0),
Math.max((int)(c.getGreen()*.85),0),
Math.max((int)(c.getBlue()*.85),0));
@@ -299,7 +299,7 @@
Object unselectedTabForeground = new UIDefaults.LazyValue() {
public Object createValue(UIDefaults table) {
- Color c = (Color)table.getColor("controlText");
+ Color c = table.getColor("controlText");
return new ColorUIResource(Math.max((int)(c.getRed()*.85),0),
Math.max((int)(c.getGreen()*.85),0),
Math.max((int)(c.getBlue()*.85),0));
@@ -308,7 +308,7 @@
Object unselectedTabShadow = new UIDefaults.LazyValue() {
public Object createValue(UIDefaults table) {
- Color c = (Color)table.getColor("control");
+ Color c = table.getColor("control");
Color base = new Color(Math.max((int)(c.getRed()*.85),0),
Math.max((int)(c.getGreen()*.85),0),
Math.max((int)(c.getBlue()*.85),0));
@@ -318,7 +318,7 @@
Object unselectedTabHighlight = new UIDefaults.LazyValue() {
public Object createValue(UIDefaults table) {
- Color c = (Color)table.getColor("control");
+ Color c = table.getColor("control");
Color base = new Color(Math.max((int)(c.getRed()*.85),0),
Math.max((int)(c.getGreen()*.85),0),
Math.max((int)(c.getBlue()*.85),0));
--- a/jdk/src/share/classes/com/sun/tools/hat/Main.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/Main.java Fri May 16 04:37:47 2008 -0700
@@ -23,18 +23,10 @@
* have any questions.
*/
-
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat;
--- a/jdk/src/share/classes/com/sun/tools/hat/build.xml Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/build.xml Fri May 16 04:37:47 2008 -0700
@@ -27,19 +27,9 @@
<!--
- The contents of this file are subject to the Sun Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. A copy of the License is available at
- http://www.sun.com/, and in the file LICENSE.html in the
- doc directory.
-
The Original Code is HAT. The Initial Developer of the
Original Code is Bill Foote, with contributions from others
- at JavaSoft/Sun. Portions created by Bill Foote and others
- at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
-
- In addition to the formal license, I ask that you don't
- change the history or donations files without permission.
+ at JavaSoft/Sun.
-->
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/AbstractJavaHeapObjectVisitor.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/AbstractJavaHeapObjectVisitor.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/ArrayTypeCodes.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/ArrayTypeCodes.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/HackJavaValue.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/HackJavaValue.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaBoolean.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaBoolean.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaByte.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaByte.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaChar.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaChar.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaClass.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaClass.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaDouble.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaDouble.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaField.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaField.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaFloat.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaFloat.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaHeapObject.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaHeapObject.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaHeapObjectVisitor.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaHeapObjectVisitor.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaInt.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaInt.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaLazyReadObject.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaLazyReadObject.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaLong.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaLong.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaObject.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaObject.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaObjectArray.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaObjectArray.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaObjectRef.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaObjectRef.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaShort.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaShort.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaStatic.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaStatic.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaThing.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaThing.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaValue.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaValue.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaValueArray.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaValueArray.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/ReachableExcludes.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/ReachableExcludes.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/ReachableExcludesImpl.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/ReachableExcludesImpl.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/ReachableObjects.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/ReachableObjects.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/ReferenceChain.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/ReferenceChain.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/Root.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/Root.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/Snapshot.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/Snapshot.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/StackFrame.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/StackFrame.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/StackTrace.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/StackTrace.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.model;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/oql/OQLEngine.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/oql/OQLEngine.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.oql;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/oql/OQLException.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/oql/OQLException.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.oql;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/oql/OQLQuery.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/oql/OQLQuery.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.oql;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/oql/ObjectVisitor.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/oql/ObjectVisitor.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.oql;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/parser/FileReadBuffer.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/parser/FileReadBuffer.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.parser;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/parser/HprofReader.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/parser/HprofReader.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,21 +23,11 @@
* have any questions.
*/
+
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.parser;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/parser/MappedReadBuffer.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/parser/MappedReadBuffer.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,21 +23,11 @@
* have any questions.
*/
+
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.parser;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/parser/PositionDataInputStream.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/parser/PositionDataInputStream.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.parser;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/parser/PositionInputStream.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/parser/PositionInputStream.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.parser;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/parser/ReadBuffer.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/parser/ReadBuffer.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.parser;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/parser/Reader.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/parser/Reader.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.parser;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.server;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/AllRootsQuery.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/AllRootsQuery.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.server;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/ClassQuery.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/ClassQuery.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.server;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/FinalizerObjectsQuery.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/FinalizerObjectsQuery.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.server;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/FinalizerSummaryQuery.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/FinalizerSummaryQuery.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.server;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/HistogramQuery.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/HistogramQuery.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.server;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/HttpReader.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/HttpReader.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.server;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/InstancesCountQuery.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/InstancesCountQuery.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,19 +24,10 @@
*/
-/* The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
+/*
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.server;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/InstancesQuery.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/InstancesQuery.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,19 +24,10 @@
*/
-/* The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
+/*
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.server;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/OQLHelp.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/OQLHelp.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.server;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/OQLQuery.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/OQLQuery.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.server;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/ObjectQuery.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/ObjectQuery.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,19 +24,10 @@
*/
-/* The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
+/*
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.server;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/PlatformClasses.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/PlatformClasses.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,19 +24,10 @@
*/
-/* The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
+/*
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.server;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/QueryHandler.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/QueryHandler.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,20 +24,10 @@
*/
-
-/* The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
+/*
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.server;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/QueryListener.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/QueryListener.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,19 +24,10 @@
*/
-/* The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
+/*
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.server;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/ReachableQuery.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/ReachableQuery.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,20 +24,10 @@
*/
-
-/* The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
+/*
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.server;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/RefsByTypeQuery.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/RefsByTypeQuery.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.server;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/RootStackQuery.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/RootStackQuery.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,19 +24,10 @@
*/
-/* The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
+/*
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.server;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/RootsQuery.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/RootsQuery.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,19 +24,10 @@
*/
-/* The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
+/*
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.server;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/util/ArraySorter.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/util/ArraySorter.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,19 +24,10 @@
*/
-/* The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
+/*
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.util;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/util/Comparer.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/util/Comparer.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,19 +24,10 @@
*/
-/* The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
+/*
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.util;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/util/CompositeEnumeration.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/util/CompositeEnumeration.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,9 @@
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.util;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/util/Misc.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/util/Misc.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,19 +24,10 @@
*/
-/* The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
+/*
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.util;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/util/VectorSorter.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/util/VectorSorter.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,19 +24,10 @@
*/
-/* The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
+/*
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
+ * at JavaSoft/Sun.
*/
package com.sun.tools.hat.internal.util;
--- a/jdk/src/share/classes/com/sun/tools/hat/resources/hat.js Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/resources/hat.js Fri May 16 04:37:47 2008 -0700
@@ -23,22 +23,10 @@
* have any questions.
*/
-
/*
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/, and in the file LICENSE.html in the
- * doc directory.
- *
* The Original Code is HAT. The Initial Developer of the
* Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun. Portions created by Bill Foote and others
- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved.
- *
- * In addition to the formal license, I ask that you don't
- * change the history or donations files without permission.
- *
+ * at JavaSoft/Sun.
*/
var hatPkg = Packages.com.sun.tools.hat.internal;
--- a/jdk/src/share/classes/java/awt/Component.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/java/awt/Component.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -49,6 +49,7 @@
import java.io.IOException;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
+import java.beans.Transient;
import java.awt.event.InputMethodListener;
import java.awt.event.InputMethodEvent;
import java.awt.im.InputContext;
@@ -1102,6 +1103,7 @@
* @see #setVisible
* @since JDK1.0
*/
+ @Transient
public boolean isVisible() {
return isVisible_NoClientCode();
}
@@ -1536,6 +1538,7 @@
* @beaninfo
* bound: true
*/
+ @Transient
public Color getForeground() {
Color foreground = this.foreground;
if (foreground != null) {
@@ -1590,6 +1593,7 @@
* @see #setBackground
* @since JDK1.0
*/
+ @Transient
public Color getBackground() {
Color background = this.background;
if (background != null) {
@@ -1649,6 +1653,7 @@
* @see #setFont
* @since JDK1.0
*/
+ @Transient
public Font getFont() {
return getFont_NoClientCode();
}
--- a/jdk/src/share/classes/java/awt/Dimension.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/java/awt/Dimension.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1995-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
package java.awt;
import java.awt.geom.Dimension2D;
+import java.beans.Transient;
/**
* The <code>Dimension</code> class encapsulates the width and
@@ -165,6 +166,7 @@
* @see java.awt.Component#getSize
* @since 1.1
*/
+ @Transient
public Dimension getSize() {
return new Dimension(width, height);
}
--- a/jdk/src/share/classes/java/awt/Point.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/java/awt/Point.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1995-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
package java.awt;
import java.awt.geom.Point2D;
+import java.beans.Transient;
/**
* A point representing a location in {@code (x,y)} coordinate space,
@@ -119,6 +120,7 @@
* @see java.awt.Point#setLocation(int, int)
* @since 1.1
*/
+ @Transient
public Point getLocation() {
return new Point(x, y);
}
--- a/jdk/src/share/classes/java/awt/Rectangle.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/java/awt/Rectangle.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1995-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
package java.awt;
import java.awt.geom.Rectangle2D;
+import java.beans.Transient;
/**
* A <code>Rectangle</code> specifies an area in a coordinate space that is
@@ -308,6 +309,7 @@
* @see #setBounds(int, int, int, int)
* @since 1.1
*/
+ @Transient
public Rectangle getBounds() {
return new Rectangle(x, y, width, height);
}
--- a/jdk/src/share/classes/java/awt/ScrollPane.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/java/awt/ScrollPane.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
import sun.awt.SunToolkit;
import java.beans.ConstructorProperties;
+import java.beans.Transient;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.IOException;
@@ -390,6 +391,7 @@
* @throws NullPointerException if the scrollpane does not contain
* a child
*/
+ @Transient
public Point getScrollPosition() {
if (ncomponents <= 0) {
throw new NullPointerException("child is null");
--- a/jdk/src/share/classes/java/awt/geom/RectangularShape.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/java/awt/geom/RectangularShape.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
import java.awt.Shape;
import java.awt.Rectangle;
+import java.beans.Transient;
/**
* <code>RectangularShape</code> is the base class for a number of
@@ -171,6 +172,7 @@
* @see #setFrame(Rectangle2D)
* @since 1.2
*/
+ @Transient
public Rectangle2D getFrame() {
return new Rectangle2D.Double(getX(), getY(), getWidth(), getHeight());
}
--- a/jdk/src/share/classes/java/awt/im/InputContext.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/java/awt/im/InputContext.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
import java.awt.Component;
import java.util.Locale;
import java.awt.AWTEvent;
+import java.beans.Transient;
import java.lang.Character.Subset;
import sun.awt.im.InputMethodContext;
@@ -231,6 +232,7 @@
* @see #setCompositionEnabled
* @since 1.3
*/
+ @Transient
public boolean isCompositionEnabled() {
// real implementation is in sun.awt.im.InputContext
return false;
--- a/jdk/src/share/classes/java/beans/DefaultPersistenceDelegate.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/java/beans/DefaultPersistenceDelegate.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -164,53 +164,19 @@
return new Expression(oldInstance, oldInstance.getClass(), "new", constructorArgs);
}
- private Method findMethod(Class type, String property) throws IntrospectionException {
+ private Method findMethod(Class type, String property) {
if (property == null) {
throw new IllegalArgumentException("Property name is null");
}
- BeanInfo info = Introspector.getBeanInfo(type);
- for (PropertyDescriptor pd : info.getPropertyDescriptors()) {
- if (property.equals(pd.getName())) {
- Method method = pd.getReadMethod();
- if (method != null) {
- return method;
- }
- throw new IllegalStateException("Could not find getter for the property " + property);
- }
- }
- throw new IllegalStateException("Could not find property by the name " + property);
- }
-
- // This is a workaround for a bug in the introspector.
- // PropertyDescriptors are not shared amongst subclasses.
- private boolean isTransient(Class type, PropertyDescriptor pd) {
- if (type == null) {
- return false;
+ PropertyDescriptor pd = getPropertyDescriptor(type, property);
+ if (pd == null) {
+ throw new IllegalStateException("Could not find property by the name " + property);
}
- // This code was mistakenly deleted - it may be fine and
- // is more efficient than the code below. This should
- // all disappear anyway when property descriptors are shared
- // by the introspector.
- /*
- Method getter = pd.getReadMethod();
- Class declaringClass = getter.getDeclaringClass();
- if (declaringClass == type) {
- return Boolean.TRUE.equals(pd.getValue("transient"));
+ Method method = pd.getReadMethod();
+ if (method == null) {
+ throw new IllegalStateException("Could not find getter for the property " + property);
}
- */
- String pName = pd.getName();
- BeanInfo info = MetaData.getBeanInfo(type);
- PropertyDescriptor[] propertyDescriptors = info.getPropertyDescriptors();
- for (int i = 0; i < propertyDescriptors.length; ++i ) {
- PropertyDescriptor pd2 = propertyDescriptors[i];
- if (pName.equals(pd2.getName())) {
- Object value = pd2.getValue("transient");
- if (value != null) {
- return Boolean.TRUE.equals(value);
- }
- }
- }
- return isTransient(type.getSuperclass(), pd);
+ return method;
}
private static boolean equals(Object o1, Object o2) {
@@ -221,7 +187,7 @@
Method getter = pd.getReadMethod();
Method setter = pd.getWriteMethod();
- if (getter != null && setter != null && !isTransient(type, pd)) {
+ if (getter != null && setter != null) {
Expression oldGetExp = new Expression(oldInstance, getter.getName(), new Object[]{});
Expression newGetExp = new Expression(newInstance, getter.getName(), new Object[]{});
Object oldValue = oldGetExp.getValue();
@@ -254,14 +220,19 @@
// Write out the properties of this instance.
private void initBean(Class type, Object oldInstance, Object newInstance, Encoder out) {
- // System.out.println("initBean: " + oldInstance);
- BeanInfo info = MetaData.getBeanInfo(type);
-
+ BeanInfo info;
+ try {
+ info = Introspector.getBeanInfo(type);
+ } catch (IntrospectionException exception) {
+ return;
+ }
// Properties
- PropertyDescriptor[] propertyDescriptors = info.getPropertyDescriptors();
- for (int i = 0; i < propertyDescriptors.length; ++i ) {
+ for (PropertyDescriptor d : info.getPropertyDescriptors()) {
+ if (d.isTransient()) {
+ continue;
+ }
try {
- doProperty(type, propertyDescriptors[i], oldInstance, newInstance, out);
+ doProperty(type, d, oldInstance, newInstance, out);
}
catch (Exception e) {
out.getExceptionListener().exceptionThrown(e);
@@ -295,9 +266,10 @@
if (!java.awt.Component.class.isAssignableFrom(type)) {
return; // Just handle the listeners of Components for now.
}
- EventSetDescriptor[] eventSetDescriptors = info.getEventSetDescriptors();
- for (int e = 0; e < eventSetDescriptors.length; e++) {
- EventSetDescriptor d = eventSetDescriptors[e];
+ for (EventSetDescriptor d : info.getEventSetDescriptors()) {
+ if (d.isTransient()) {
+ continue;
+ }
Class listenerType = d.getListenerType();
@@ -408,4 +380,15 @@
initBean(type, oldInstance, newInstance, out);
}
}
+
+ private static PropertyDescriptor getPropertyDescriptor(Class type, String property) {
+ try {
+ for (PropertyDescriptor pd : Introspector.getBeanInfo(type).getPropertyDescriptors()) {
+ if (property.equals(pd.getName()))
+ return pd;
+ }
+ } catch (IntrospectionException exception) {
+ }
+ return null;
+ }
}
--- a/jdk/src/share/classes/java/beans/EventSetDescriptor.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/java/beans/EventSetDescriptor.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1996-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -369,6 +369,7 @@
setClass0(method.getDeclaringClass());
}
addMethodDescriptor = new MethodDescriptor(method);
+ setTransient(method.getAnnotation(Transient.class));
}
/**
@@ -389,6 +390,7 @@
setClass0(method.getDeclaringClass());
}
removeMethodDescriptor = new MethodDescriptor(method);
+ setTransient(method.getAnnotation(Transient.class));
}
/**
@@ -411,6 +413,7 @@
setClass0(method.getDeclaringClass());
}
getMethodDescriptor = new MethodDescriptor(method);
+ setTransient(method.getAnnotation(Transient.class));
}
/**
--- a/jdk/src/share/classes/java/beans/FeatureDescriptor.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/java/beans/FeatureDescriptor.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1996-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,9 @@
import java.lang.ref.SoftReference;
import java.lang.reflect.Method;
-import java.lang.reflect.Type;
+
+import java.util.Enumeration;
+import java.util.Hashtable;
/**
* The FeatureDescriptor class is the common baseclass for PropertyDescriptor,
@@ -46,6 +48,7 @@
*/
public class FeatureDescriptor {
+ private static final String TRANSIENT = "transient";
private Reference<Class> classRef;
@@ -187,10 +190,7 @@
* @param value The value.
*/
public void setValue(String attributeName, Object value) {
- if (table == null) {
- table = new java.util.Hashtable();
- }
- table.put(attributeName, value);
+ getTable().put(attributeName, value);
}
/**
@@ -201,10 +201,9 @@
* the attribute is unknown.
*/
public Object getValue(String attributeName) {
- if (table == null) {
- return null;
- }
- return table.get(attributeName);
+ return (this.table != null)
+ ? this.table.get(attributeName)
+ : null;
}
/**
@@ -214,11 +213,8 @@
* @return An enumeration of the locale-independent names of any
* attributes that have been registered with setValue.
*/
- public java.util.Enumeration<String> attributeNames() {
- if (table == null) {
- table = new java.util.Hashtable();
- }
- return table.keys();
+ public Enumeration<String> attributeNames() {
+ return getTable().keys();
}
/**
@@ -268,18 +264,56 @@
addTable(old.table);
}
- private void addTable(java.util.Hashtable t) {
- if (t == null) {
- return;
+ /**
+ * Copies all values from the specified attribute table.
+ * If some attribute is exist its value should be overridden.
+ *
+ * @param table the attribute table with new values
+ */
+ private void addTable(Hashtable<String, Object> table) {
+ if ((table != null) && !table.isEmpty()) {
+ getTable().putAll(table);
+ }
+ }
+
+ /**
+ * Returns the initialized attribute table.
+ *
+ * @return the initialized attribute table
+ */
+ private Hashtable<String, Object> getTable() {
+ if (this.table == null) {
+ this.table = new Hashtable<String, Object>();
}
- java.util.Enumeration keys = t.keys();
- while (keys.hasMoreElements()) {
- String key = (String)keys.nextElement();
- Object value = t.get(key);
- setValue(key, value);
+ return this.table;
+ }
+
+ /**
+ * Sets the "transient" attribute according to the annotation.
+ * If the "transient" attribute is already set
+ * it should not be changed.
+ *
+ * @param annotation the annotation of the element of the feature
+ */
+ void setTransient(Transient annotation) {
+ if ((annotation != null) && (null == getValue(TRANSIENT))) {
+ setValue(TRANSIENT, annotation.value());
}
}
+ /**
+ * Indicates whether the feature is transient.
+ *
+ * @return {@code true} if the feature is transient,
+ * {@code false} otherwise
+ */
+ boolean isTransient() {
+ Object value = getValue(TRANSIENT);
+ return (value instanceof Boolean)
+ ? (Boolean) value
+ : false;
+ }
+
// Package private methods for recreating the weak/soft referent
void setClass0(Class cls) {
@@ -293,39 +327,6 @@
}
/**
- * Create a Reference wrapper for the object.
- *
- * @param obj object that will be wrapped
- * @param soft true if a SoftReference should be created; otherwise Soft
- * @return a Reference or null if obj is null.
- */
- static Reference createReference(Object obj, boolean soft) {
- Reference ref = null;
- if (obj != null) {
- if (soft) {
- ref = new SoftReference(obj);
- } else {
- ref = new WeakReference(obj);
- }
- }
- return ref;
- }
-
- // Convenience method which creates a WeakReference.
- static Reference createReference(Object obj) {
- return createReference(obj, false);
- }
-
- /**
- * Returns an object from a Reference wrapper.
- *
- * @return the Object in a wrapper or null.
- */
- static Object getObject(Reference ref) {
- return (ref == null) ? null : (Object)ref.get();
- }
-
- /**
* Creates a new soft reference that refers to the given object.
*
* @return a new soft reference or <code>null</code> if object is <code>null</code>
@@ -391,5 +392,5 @@
private String shortDescription;
private String name;
private String displayName;
- private java.util.Hashtable table;
+ private Hashtable<String, Object> table;
}
--- a/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1996-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -231,6 +231,7 @@
indexedReadMethodName = readMethod.getName();
this.indexedReadMethodRef = getSoftReference(readMethod);
+ setTransient(readMethod.getAnnotation(Transient.class));
}
@@ -303,6 +304,7 @@
indexedWriteMethodName = writeMethod.getName();
this.indexedWriteMethodRef = getSoftReference(writeMethod);
+ setTransient(writeMethod.getAnnotation(Transient.class));
}
/**
--- a/jdk/src/share/classes/java/beans/MetaData.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/java/beans/MetaData.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1352,7 +1352,6 @@
class MetaData {
private static Hashtable internalPersistenceDelegates = new Hashtable();
- private static Hashtable transientProperties = new Hashtable();
private static PersistenceDelegate nullPersistenceDelegate = new NullPersistenceDelegate();
private static PersistenceDelegate enumPersistenceDelegate = new EnumPersistenceDelegate();
@@ -1383,94 +1382,6 @@
internalPersistenceDelegates.put("java.util.JumboEnumSet", new java_util_EnumSet_PersistenceDelegate());
internalPersistenceDelegates.put("java.util.RegularEnumSet", new java_util_EnumSet_PersistenceDelegate());
-
-// Transient properties
-
- // awt
-
- // Infinite graphs.
- removeProperty("java.awt.geom.RectangularShape", "frame");
- // removeProperty("java.awt.Rectangle2D", "frame");
- // removeProperty("java.awt.Rectangle", "frame");
-
- removeProperty("java.awt.Rectangle", "bounds");
- removeProperty("java.awt.Dimension", "size");
- removeProperty("java.awt.Point", "location");
-
- // The color and font properties in Component need special treatment, see above.
- removeProperty("java.awt.Component", "foreground");
- removeProperty("java.awt.Component", "background");
- removeProperty("java.awt.Component", "font");
-
- // The visible property of Component needs special treatment because of Windows.
- removeProperty("java.awt.Component", "visible");
-
- // This property throws an exception if accessed when there is no child.
- removeProperty("java.awt.ScrollPane", "scrollPosition");
-
- // 4917458 this should be removed for XAWT since it may throw
- // an unsupported exception if there isn't any input methods.
- // This shouldn't be a problem since these are added behind
- // the scenes automatically.
- removeProperty("java.awt.im.InputContext", "compositionEnabled");
-
- // swing
-
- // The size properties in JComponent need special treatment, see above.
- removeProperty("javax.swing.JComponent", "minimumSize");
- removeProperty("javax.swing.JComponent", "preferredSize");
- removeProperty("javax.swing.JComponent", "maximumSize");
-
- // These properties have platform specific implementations
- // and should not appear in archives.
- removeProperty("javax.swing.ImageIcon", "image");
- removeProperty("javax.swing.ImageIcon", "imageObserver");
-
- // This property unconditionally throws a "not implemented" exception.
- removeProperty("javax.swing.JMenuBar", "helpMenu");
-
- // The scrollBars in a JScrollPane are dynamic and should not
- // be archived. The row and columns headers are changed by
- // components like JTable on "addNotify".
- removeProperty("javax.swing.JScrollPane", "verticalScrollBar");
- removeProperty("javax.swing.JScrollPane", "horizontalScrollBar");
- removeProperty("javax.swing.JScrollPane", "rowHeader");
- removeProperty("javax.swing.JScrollPane", "columnHeader");
-
- removeProperty("javax.swing.JViewport", "extentSize");
-
- // Renderers need special treatment, since their properties
- // change during rendering.
- removeProperty("javax.swing.table.JTableHeader", "defaultRenderer");
- removeProperty("javax.swing.JList", "cellRenderer");
-
- removeProperty("javax.swing.JList", "selectedIndices");
-
- // The lead and anchor selection indexes are best ignored.
- // Selection is rarely something that should persist from
- // development to deployment.
- removeProperty("javax.swing.DefaultListSelectionModel", "leadSelectionIndex");
- removeProperty("javax.swing.DefaultListSelectionModel", "anchorSelectionIndex");
-
- // The selection must come after the text itself.
- removeProperty("javax.swing.JComboBox", "selectedIndex");
-
- // All selection information should come after the JTabbedPane is built
- removeProperty("javax.swing.JTabbedPane", "selectedIndex");
- removeProperty("javax.swing.JTabbedPane", "selectedComponent");
-
- // PENDING: The "disabledIcon" property is often computed from the icon property.
- removeProperty("javax.swing.AbstractButton", "disabledIcon");
- removeProperty("javax.swing.JLabel", "disabledIcon");
-
- // The caret property throws errors when it it set beyond
- // the extent of the text. We could just set it after the
- // text, but this is probably not something we want to archive anyway.
- removeProperty("javax.swing.text.JTextComponent", "caret");
- removeProperty("javax.swing.text.JTextComponent", "caretPosition");
- // The selectionStart must come after the text itself.
- removeProperty("javax.swing.text.JTextComponent", "selectionStart");
- removeProperty("javax.swing.text.JTextComponent", "selectionEnd");
}
/*pp*/ static boolean equals(Object o1, Object o2) {
@@ -1509,18 +1420,6 @@
// }
String typeName = type.getName();
-
- // Check to see if there are properties that have been lazily registered for removal.
- if (getBeanAttribute(type, "transient_init") == null) {
- Vector tp = (Vector)transientProperties.get(typeName);
- if (tp != null) {
- for(int i = 0; i < tp.size(); i++) {
- setPropertyAttribute(type, (String)tp.get(i), "transient", Boolean.TRUE);
- }
- }
- setBeanAttribute(type, "transient_init", Boolean.TRUE);
- }
-
PersistenceDelegate pd = (PersistenceDelegate)getBeanAttribute(type, "persistenceDelegate");
if (pd == null) {
pd = (PersistenceDelegate)internalPersistenceDelegates.get(typeName);
@@ -1583,55 +1482,11 @@
return true;
}
- // Wrapper for Introspector.getBeanInfo to handle exception handling.
- // Note: this relys on new 1.4 Introspector semantics which cache the BeanInfos
- public static BeanInfo getBeanInfo(Class type) {
- BeanInfo info = null;
+ private static Object getBeanAttribute(Class type, String attribute) {
try {
- info = Introspector.getBeanInfo(type);
- } catch (Throwable e) {
- e.printStackTrace();
- }
-
- return info;
- }
-
- private static PropertyDescriptor getPropertyDescriptor(Class type, String propertyName) {
- BeanInfo info = getBeanInfo(type);
- PropertyDescriptor[] propertyDescriptors = info.getPropertyDescriptors();
- // System.out.println("Searching for: " + propertyName + " in " + type);
- for(int i = 0; i < propertyDescriptors.length; i++) {
- PropertyDescriptor pd = propertyDescriptors[i];
- if (propertyName.equals(pd.getName())) {
- return pd;
- }
+ return Introspector.getBeanInfo(type).getBeanDescriptor().getValue(attribute);
+ } catch (IntrospectionException exception) {
+ return null;
}
- return null;
- }
-
- private static void setPropertyAttribute(Class type, String property, String attribute, Object value) {
- PropertyDescriptor pd = getPropertyDescriptor(type, property);
- if (pd == null) {
- System.err.println("Warning: property " + property + " is not defined on " + type);
- return;
- }
- pd.setValue(attribute, value);
- }
-
- private static void setBeanAttribute(Class type, String attribute, Object value) {
- getBeanInfo(type).getBeanDescriptor().setValue(attribute, value);
- }
-
- private static Object getBeanAttribute(Class type, String attribute) {
- return getBeanInfo(type).getBeanDescriptor().getValue(attribute);
- }
-
- private static void removeProperty(String typeName, String property) {
- Vector tp = (Vector)transientProperties.get(typeName);
- if (tp == null) {
- tp = new Vector();
- transientProperties.put(typeName, tp);
- }
- tp.add(property);
}
}
--- a/jdk/src/share/classes/java/beans/PropertyDescriptor.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/java/beans/PropertyDescriptor.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1996-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -256,6 +256,7 @@
readMethodName = readMethod.getName();
this.readMethodRef = getSoftReference(readMethod);
+ setTransient(readMethod.getAnnotation(Transient.class));
}
/**
@@ -320,7 +321,7 @@
writeMethodName = writeMethod.getName();
this.writeMethodRef = getSoftReference(writeMethod);
-
+ setTransient(writeMethod.getAnnotation(Transient.class));
}
private Method getReadMethod0() {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/java/beans/Transient.java Fri May 16 04:37:47 2008 -0700
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.beans;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * Indicates that an attribute called "transient"
+ * should be declared with the given {@code value}
+ * when the {@link Introspector} constructs
+ * a {@link PropertyDescriptor} or {@link EventSetDescriptor}
+ * classes associated with the annotated code element.
+ * A {@code true} value for the "transient" attribute
+ * indicates to encoders derived from {@link Encoder}
+ * that this feature should be ignored.
+ * <p/>
+ * The {@code Transient} annotation may be be used
+ * in any of the methods that are involved
+ * in a {@link FeatureDescriptor} subclass
+ * to identify the transient feature in the annotated class and its subclasses.
+ * Normally, the method that starts with "get" is the best place
+ * to put the annotation and it is this declaration
+ * that takes precedence in the case of multiple annotations
+ * being defined for the same feature.
+ * <p/>
+ * To declare a feature non-transient in a class
+ * whose superclass declares it transient,
+ * use {@code @Transient(false)}.
+ * In all cases, the {@link Introspector} decides
+ * if a feature is transient by referring to the annotation
+ * on the most specific superclass.
+ * If no {@code Transient} annotation is present
+ * in any superclass the feature is not transient.
+ *
+ * @since 1.7
+ */
+@Target({METHOD})
+@Retention(RUNTIME)
+public @interface Transient {
+ boolean value() default true;
+}
--- a/jdk/src/share/classes/javax/swing/AbstractButton.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/AbstractButton.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,9 @@
import java.awt.image.*;
import java.text.*;
import java.awt.geom.*;
-import java.beans.*;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.beans.Transient;
import java.util.Enumeration;
import java.util.Vector;
import java.io.Serializable;
@@ -645,6 +647,7 @@
* @see #setDisabledIcon
* @see javax.swing.LookAndFeel#getDisabledIcon
*/
+ @Transient
public Icon getDisabledIcon() {
if (disabledIcon == null) {
disabledIcon = UIManager.getLookAndFeel().getDisabledIcon(this, getIcon());
--- a/jdk/src/share/classes/javax/swing/DefaultListSelectionModel.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/DefaultListSelectionModel.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
import java.util.EventListener;
import java.util.BitSet;
import java.io.Serializable;
+import java.beans.Transient;
import javax.swing.event.*;
@@ -714,11 +715,13 @@
}
/** {@inheritDoc} */
+ @Transient
public int getAnchorSelectionIndex() {
return anchorIndex;
}
/** {@inheritDoc} */
+ @Transient
public int getLeadSelectionIndex() {
return leadIndex;
}
--- a/jdk/src/share/classes/javax/swing/ImageIcon.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/ImageIcon.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
import java.awt.*;
import java.awt.image.*;
import java.beans.ConstructorProperties;
+import java.beans.Transient;
import java.net.URL;
import java.io.Serializable;
@@ -336,6 +337,7 @@
* Returns this icon's <code>Image</code>.
* @return the <code>Image</code> object for this <code>ImageIcon</code>
*/
+ @Transient
public Image getImage() {
return image;
}
@@ -436,6 +438,7 @@
*
* @return the image observer, which may be null
*/
+ @Transient
public ImageObserver getImageObserver() {
return imageObserver;
}
--- a/jdk/src/share/classes/javax/swing/JComboBox.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/JComboBox.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,9 @@
*/
package javax.swing;
-import java.beans.*;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.beans.Transient;
import java.util.*;
import java.awt.*;
@@ -636,6 +638,7 @@
* or -1 if no item is selected or if
* the currently selected item is not in the list
*/
+ @Transient
public int getSelectedIndex() {
Object sObject = dataModel.getSelectedItem();
int i,c;
--- a/jdk/src/share/classes/javax/swing/JComponent.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/JComponent.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,10 @@
import java.awt.peer.LightweightPeer;
import java.awt.dnd.DropTarget;
import java.awt.font.FontRenderContext;
-import java.beans.*;
+import java.beans.PropertyChangeListener;
+import java.beans.VetoableChangeListener;
+import java.beans.VetoableChangeSupport;
+import java.beans.Transient;
import java.applet.Applet;
@@ -1634,6 +1637,7 @@
* @see #setPreferredSize
* @see ComponentUI
*/
+ @Transient
public Dimension getPreferredSize() {
if (isPreferredSizeSet()) {
return super.getPreferredSize();
@@ -1675,6 +1679,7 @@
* @see #setMaximumSize
* @see ComponentUI
*/
+ @Transient
public Dimension getMaximumSize() {
if (isMaximumSizeSet()) {
return super.getMaximumSize();
@@ -1714,6 +1719,7 @@
* @see #setMinimumSize
* @see ComponentUI
*/
+ @Transient
public Dimension getMinimumSize() {
if (isMinimumSizeSet()) {
return super.getMinimumSize();
--- a/jdk/src/share/classes/javax/swing/JEditorPane.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/JEditorPane.java Fri May 16 04:37:47 2008 -0700
@@ -429,9 +429,8 @@
// different url or POST method, load the new content
int p = getAsynchronousLoadPriority(getDocument());
- if ((postData == null) || (p < 0)) {
- // Either we do not have POST data, or should submit the data
- // synchronously.
+ if (p < 0) {
+ // open stream synchronously
InputStream in = getStream(page);
if (kit != null) {
Document doc = initializeModel(kit, page);
@@ -440,22 +439,13 @@
// view notifications slowing it down (i.e. best synchronous
// behavior) or set the model and start to feed it on a separate
// thread (best asynchronous behavior).
- synchronized(this) {
- if (loading != null) {
- // we are loading asynchronously, so we need to cancel
- // the old stream.
- loading.cancel();
- loading = null;
- }
- }
p = getAsynchronousLoadPriority(doc);
if (p >= 0) {
// load asynchronously
setDocument(doc);
synchronized(this) {
- loading = new PageStream(in);
- Thread pl = new PageLoader(doc, loading, p, loaded, page);
- pl.start();
+ pageLoader = new PageLoader(doc, in, loaded, page);
+ pageLoader.execute();
}
return;
}
@@ -464,11 +454,15 @@
reloaded = true;
}
} else {
- // We have POST data and should send it asynchronously.
- // Send (and subsequentally read) data in separate thread.
+ // we may need to cancel background loading
+ if (pageLoader != null) {
+ pageLoader.cancel(true);
+ }
+
+ // Do everything in a background thread.
// Model initialization is deferred to that thread, too.
- Thread pl = new PageLoader(null, null, p, loaded, page);
- pl.start();
+ pageLoader = new PageLoader(null, null, loaded, page);
+ pageLoader.execute();
return;
}
}
@@ -604,44 +598,38 @@
/**
- * Thread to load a stream into the text document model.
+ * Loads a stream into the text document model.
*/
- class PageLoader extends Thread {
+ class PageLoader extends SwingWorker<URL, Object> {
/**
* Construct an asynchronous page loader.
*/
- PageLoader(Document doc, InputStream in, int priority, URL old,
- URL page) {
- setPriority(priority);
+ PageLoader(Document doc, InputStream in, URL old, URL page) {
this.in = in;
this.old = old;
this.page = page;
this.doc = doc;
}
- boolean pageLoaded = false;
-
/**
* Try to load the document, then scroll the view
* to the reference (if specified). When done, fire
* a page property change event.
*/
- public void run() {
+ protected URL doInBackground() {
+ boolean pageLoaded = false;
try {
if (in == null) {
in = getStream(page);
if (kit == null) {
// We received document of unknown content type.
- UIManager.getLookAndFeel().provideErrorFeedback(
- JEditorPane.this);
- return;
- }
- // Access to <code>loading</code> should be synchronized.
- synchronized(JEditorPane.this) {
- in = loading = new PageStream(in);
+ UIManager.getLookAndFeel().
+ provideErrorFeedback(JEditorPane.this);
+ return old;
}
}
+
if (doc == null) {
try {
SwingUtilities.invokeAndWait(new Runnable() {
@@ -653,11 +641,11 @@
} catch (InvocationTargetException ex) {
UIManager.getLookAndFeel().provideErrorFeedback(
JEditorPane.this);
- return;
+ return old;
} catch (InterruptedException ex) {
UIManager.getLookAndFeel().provideErrorFeedback(
JEditorPane.this);
- return;
+ return old;
}
}
@@ -682,16 +670,14 @@
} catch (IOException ioe) {
UIManager.getLookAndFeel().provideErrorFeedback(JEditorPane.this);
} finally {
- synchronized(JEditorPane.this) {
- loading = null;
+ if (pageLoaded) {
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ JEditorPane.this.firePropertyChange("page", old, page);
+ }
+ });
}
- SwingUtilities.invokeLater(new Runnable() {
- public void run() {
- if (pageLoaded) {
- firePropertyChange("page", old, page);
- }
- }
- });
+ return (pageLoaded ? page : old);
}
}
@@ -718,51 +704,6 @@
Document doc;
}
- static class PageStream extends FilterInputStream {
-
- boolean canceled;
-
- public PageStream(InputStream i) {
- super(i);
- canceled = false;
- }
-
- /**
- * Cancel the loading of the stream by throwing
- * an IOException on the next request.
- */
- public synchronized void cancel() {
- canceled = true;
- }
-
- protected synchronized void checkCanceled() throws IOException {
- if (canceled) {
- throw new IOException("page canceled");
- }
- }
-
- public int read() throws IOException {
- checkCanceled();
- return super.read();
- }
-
- public long skip(long n) throws IOException {
- checkCanceled();
- return super.skip(n);
- }
-
- public int available() throws IOException {
- checkCanceled();
- return super.available();
- }
-
- public void reset() throws IOException {
- checkCanceled();
- super.reset();
- }
-
- }
-
/**
* Fetches a stream for the given URL, which is about to
* be loaded by the <code>setPage</code> method. By
@@ -1179,11 +1120,6 @@
* current selection. The replacement text will have the
* attributes currently defined for input. If the component is not
* editable, beep and return.
- * <p>
- * This method is thread safe, although most Swing methods
- * are not. Please see
- * <A HREF="http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html">How
- * to Use Threads</A> for more information.
*
* @param content the content to replace the selection with. This
* value can be <code>null</code>
@@ -1454,11 +1390,6 @@
* create a StringReader and call the read method. In this case the model
* would be replaced after it was initialized with the contents of the
* string.
- * <p>
- * This method is thread safe, although most Swing methods
- * are not. Please see
- * <A HREF="http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html">How
- * to Use Threads</A> for more information.
*
* @param t the new text to be set; if <code>null</code> the old
* text will be deleted
@@ -1573,11 +1504,7 @@
// --- variables ---------------------------------------
- /**
- * Stream currently loading asynchronously (potentially cancelable).
- * Access to this variable should be synchronized.
- */
- PageStream loading;
+ private SwingWorker<URL, Object> pageLoader;
/**
* Current content binding of the editor.
--- a/jdk/src/share/classes/javax/swing/JLabel.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/JLabel.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@
import java.awt.*;
import java.text.*;
import java.awt.geom.*;
+import java.beans.Transient;
import java.io.ObjectOutputStream;
import java.io.ObjectInputStream;
@@ -422,6 +423,7 @@
* @see javax.swing.LookAndFeel#getDisabledIcon
* @see ImageIcon
*/
+ @Transient
public Icon getDisabledIcon() {
if (!disabledIconSet && disabledIcon == null && defaultIcon != null) {
disabledIcon = UIManager.getLookAndFeel().getDisabledIcon(this, defaultIcon);
--- a/jdk/src/share/classes/javax/swing/JList.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/JList.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,9 @@
import java.util.Vector;
import java.util.Locale;
-import java.beans.*;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.beans.Transient;
import javax.swing.event.*;
import javax.accessibility.*;
@@ -724,6 +726,7 @@
* @return the value of the {@code cellRenderer} property
* @see #setCellRenderer
*/
+ @Transient
public ListCellRenderer getCellRenderer() {
return cellRenderer;
}
@@ -2153,6 +2156,7 @@
* @see #removeSelectionInterval
* @see #addListSelectionListener
*/
+ @Transient
public int[] getSelectedIndices() {
ListSelectionModel sm = getSelectionModel();
int iMin = sm.getMinSelectionIndex();
--- a/jdk/src/share/classes/javax/swing/JMenuBar.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/JMenuBar.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.*;
+import java.beans.Transient;
import java.util.Vector;
import java.util.Enumeration;
@@ -236,6 +237,7 @@
*
* @return the <code>JMenu</code> that delivers help to the user
*/
+ @Transient
public JMenu getHelpMenu() {
throw new Error("getHelpMenu() not yet implemented.");
}
--- a/jdk/src/share/classes/javax/swing/JScrollPane.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/JScrollPane.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -43,8 +43,9 @@
import java.io.ObjectInputStream;
import java.io.IOException;
-import java.beans.*;
-
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.beans.Transient;
/**
* Provides a scrollable view of a lightweight component.
@@ -822,6 +823,7 @@
* @return the <code>horizontalScrollBar</code> property
* @see #setHorizontalScrollBar
*/
+ @Transient
public JScrollBar getHorizontalScrollBar() {
return horizontalScrollBar;
}
@@ -880,6 +882,7 @@
* @return the <code>verticalScrollBar</code> property
* @see #setVerticalScrollBar
*/
+ @Transient
public JScrollBar getVerticalScrollBar() {
return verticalScrollBar;
}
@@ -1012,6 +1015,7 @@
* @return the <code>rowHeader</code> property
* @see #setRowHeader
*/
+ @Transient
public JViewport getRowHeader() {
return rowHeader;
}
@@ -1081,6 +1085,7 @@
* @return the <code>columnHeader</code> property
* @see #setColumnHeader
*/
+ @Transient
public JViewport getColumnHeader() {
return columnHeader;
}
--- a/jdk/src/share/classes/javax/swing/JTabbedPane.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/JTabbedPane.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
import java.awt.*;
import java.awt.event.*;
-import java.beans.*;
+import java.beans.Transient;
import java.util.*;
import javax.swing.event.*;
import javax.swing.plaf.*;
@@ -563,6 +563,7 @@
* @return the index of the selected tab
* @see #setSelectedIndex
*/
+ @Transient
public int getSelectedIndex() {
return model.getSelectedIndex();
}
@@ -648,6 +649,7 @@
* @return the component corresponding to the selected tab
* @see #setSelectedComponent
*/
+ @Transient
public Component getSelectedComponent() {
int index = getSelectedIndex();
if (index == -1) {
--- a/jdk/src/share/classes/javax/swing/JTextArea.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/JTextArea.java Fri May 16 04:37:47 2008 -0700
@@ -444,11 +444,6 @@
/**
* Inserts the specified text at the specified position. Does nothing
* if the model is null or if the text is null or empty.
- * <p>
- * This method is thread safe, although most Swing methods
- * are not. Please see
- * <A HREF="http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html">How
- * to Use Threads</A> for more information.
*
* @param str the text to insert
* @param pos the position at which to insert >= 0
@@ -471,11 +466,6 @@
/**
* Appends the given text to the end of the document. Does nothing if
* the model is null or the string is null or empty.
- * <p>
- * This method is thread safe, although most Swing methods
- * are not. Please see
- * <A HREF="http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html">How
- * to Use Threads</A> for more information.
*
* @param str the text to insert
* @see #insert
@@ -494,11 +484,6 @@
* Replaces text from the indicated start to end position with the
* new text specified. Does nothing if the model is null. Simply
* does a delete if the new string is null or empty.
- * <p>
- * This method is thread safe, although most Swing methods
- * are not. Please see
- * <A HREF="http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html">How
- * to Use Threads</A> for more information.
*
* @param str the text to use as the replacement
* @param start the start position >= 0
--- a/jdk/src/share/classes/javax/swing/JTextPane.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/JTextPane.java Fri May 16 04:37:47 2008 -0700
@@ -167,11 +167,6 @@
* current selection. The replacement text will have the
* attributes currently defined for input at the point of
* insertion. If the document is not editable, beep and return.
- * <p>
- * This method is thread safe, although most Swing methods
- * are not. Please see
- * <A HREF="http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html">How
- * to Use Threads</A> for more information.
*
* @param content the content to replace the selection with
*/
@@ -229,11 +224,6 @@
* a value of <code>0.75</code> will cause 75 percent of the
* component to be above the baseline, and 25 percent of the
* component to be below the baseline.
- * <p>
- * This method is thread safe, although most Swing methods
- * are not. Please see
- * <A HREF="http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html">How
- * to Use Threads</A> for more information.
*
* @param c the component to insert
*/
@@ -252,11 +242,6 @@
* current position of the caret. This is represented in
* the associated document as an attribute of one character
* of content.
- * <p>
- * This method is thread safe, although most Swing methods
- * are not. Please see
- * <A HREF="http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html">How
- * to Use Threads</A> for more information.
*
* @param g the icon to insert
* @see Icon
@@ -320,11 +305,6 @@
* through the logical style assigned to the paragraph, which
* in term may resolve through some hierarchy completely
* independent of the element hierarchy in the document.
- * <p>
- * This method is thread safe, although most Swing methods
- * are not. Please see
- * <A HREF="http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html">How
- * to Use Threads</A> for more information.
*
* @param s the logical style to assign to the paragraph,
* or <code>null</code> for no style
@@ -367,11 +347,6 @@
* is no selection, the attributes are applied to
* the input attribute set which defines the attributes
* for any new text that gets inserted.
- * <p>
- * This method is thread safe, although most Swing methods
- * are not. Please see
- * <A HREF="http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html">How
- * to Use Threads</A> for more information.
*
* @param attr the attributes
* @param replace if true, then replace the existing attributes first
@@ -412,11 +387,6 @@
* to the paragraphs that intersect the selection.
* If there is no selection, the attributes are applied
* to the paragraph at the current caret position.
- * <p>
- * This method is thread safe, although most Swing methods
- * are not. Please see
- * <A HREF="http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html">How
- * to Use Threads</A> for more information.
*
* @param attr the non-<code>null</code> attributes
* @param replace if true, replace the existing attributes first
--- a/jdk/src/share/classes/javax/swing/JViewport.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/JViewport.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
import java.awt.image.VolatileImage;
import java.awt.peer.ComponentPeer;
import java.applet.Applet;
+import java.beans.Transient;
import javax.swing.plaf.ViewportUI;
import javax.swing.event.*;
@@ -1257,6 +1258,7 @@
*
* @return a <code>Dimension</code> object giving the size of the view
*/
+ @Transient
public Dimension getExtentSize() {
return getSize();
}
--- a/jdk/src/share/classes/javax/swing/MenuSelectionManager.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/MenuSelectionManager.java Fri May 16 04:37:47 2008 -0700
@@ -218,9 +218,9 @@
int selectionSize;
p = event.getPoint();
- Component source = (Component)event.getSource();
+ Component source = event.getComponent();
- if (!source.isShowing()) {
+ if ((source != null) && !source.isShowing()) {
// This can happen if a mouseReleased removes the
// containing component -- bug 4146684
return;
@@ -236,7 +236,9 @@
return;
}
- SwingUtilities.convertPointToScreen(p,source);
+ if (source != null) {
+ SwingUtilities.convertPointToScreen(p, source);
+ }
screenX = p.x;
screenY = p.y;
--- a/jdk/src/share/classes/javax/swing/Popup.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/Popup.java Fri May 16 04:37:47 2008 -0700
@@ -229,7 +229,15 @@
// Popups are typically transient and most likely won't benefit
// from true double buffering. Turn it off here.
getRootPane().setUseTrueDoubleBuffering(false);
- setAlwaysOnTop(true);
+ // Try to set "always-on-top" for the popup window.
+ // Applets usually don't have sufficient permissions to do it.
+ // In this case simply ignore the exception.
+ try {
+ setAlwaysOnTop(true);
+ } catch (SecurityException se) {
+ // setAlwaysOnTop is restricted,
+ // the exception is ignored
+ }
}
public void update(Graphics g) {
--- a/jdk/src/share/classes/javax/swing/ScrollPaneLayout.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/ScrollPaneLayout.java Fri May 16 04:37:47 2008 -0700
@@ -488,10 +488,14 @@
Dimension viewSize = null;
Component view = null;
- if (viewport != null) {
+ if (viewport != null) {
extentSize = viewport.getPreferredSize();
view = viewport.getView();
- viewSize = view.getPreferredSize();
+ if (view != null) {
+ viewSize = view.getPreferredSize();
+ } else {
+ viewSize = new Dimension(0, 0);
+ }
}
/* If there's a viewport add its preferredSize.
--- a/jdk/src/share/classes/javax/swing/border/TitledBorder.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/border/TitledBorder.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -642,6 +642,9 @@
if (c == null) {
throw new NullPointerException("Must supply non-null component");
}
+ if (width < 0) {
+ throw new IllegalArgumentException("Width must be >= 0");
+ }
if (height < 0) {
throw new IllegalArgumentException("Height must be >= 0");
}
--- a/jdk/src/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1998-2001 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,9 +26,7 @@
package javax.swing.colorchooser;
import java.awt.*;
-import java.io.Serializable;
import javax.swing.*;
-import javax.swing.event.*;
/**
* This is the abstract superclass for color choosers. If you want to add
@@ -55,17 +53,6 @@
private JColorChooser chooser;
/**
- *
- */
- private ChangeListener colorListener;
-
- /**
- *
- */
- private boolean dirty = true;
-
-
- /**
* Invoked automatically when the model's state changes.
* It is also called by <code>installChooserPanel</code> to allow
* you to set up the initial state of your chooser.
@@ -157,8 +144,6 @@
chooser = enclosingChooser;
buildChooser();
updateChooser();
- colorListener = new ModelListener();
- getColorSelectionModel().addChangeListener(colorListener);
}
/**
@@ -166,7 +151,6 @@
* If override this, be sure to call <code>super</code>.
*/
public void uninstallChooserPanel(JColorChooser enclosingChooser) {
- getColorSelectionModel().removeChangeListener(colorListener);
chooser = null;
}
@@ -192,10 +176,6 @@
* @param g the <code>Graphics</code> object
*/
public void paint(Graphics g) {
- if (dirty) {
- updateChooser();
- dirty = false;
- }
super.paint(g);
}
@@ -222,18 +202,4 @@
}
return defaultValue;
}
-
- /**
- *
- */
- class ModelListener implements ChangeListener, Serializable {
- public void stateChanged(ChangeEvent e) {
- if (isShowing()) { // isVisible
- updateChooser();
- dirty = false;
- } else {
- dirty = true;
- }
- }
- }
}
--- a/jdk/src/share/classes/javax/swing/filechooser/FileSystemView.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/filechooser/FileSystemView.java Fri May 16 04:37:47 2008 -0700
@@ -26,26 +26,18 @@
package javax.swing.filechooser;
-import javax.swing.event.*;
import javax.swing.*;
import java.awt.Image;
import java.io.File;
-import java.io.FileFilter;
-import java.io.FilenameFilter;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
import java.util.Vector;
+import java.lang.ref.WeakReference;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeEvent;
-
-import java.lang.reflect.*;
-
import sun.awt.shell.*;
/**
@@ -74,18 +66,11 @@
static FileSystemView unixFileSystemView = null;
//static FileSystemView macFileSystemView = null;
static FileSystemView genericFileSystemView = null;
- static boolean useSystemExtensionsHiding = false;
+
+ private boolean useSystemExtensionHiding =
+ UIManager.getDefaults().getBoolean("FileChooser.useSystemExtensionHiding");
public static FileSystemView getFileSystemView() {
- useSystemExtensionsHiding = UIManager.getDefaults().getBoolean("FileChooser.useSystemExtensionHiding");
- UIManager.addPropertyChangeListener(new PropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent e) {
- if (e.getPropertyName().equals("lookAndFeel")) {
- useSystemExtensionsHiding = UIManager.getDefaults().getBoolean("FileChooser.useSystemExtensionHiding");
- }
- }
- });
-
if(File.separatorChar == '\\') {
if(windowsFileSystemView == null) {
windowsFileSystemView = new WindowsFileSystemView();
@@ -113,6 +98,26 @@
return genericFileSystemView;
}
+ public FileSystemView() {
+ final WeakReference<FileSystemView> weakReference = new WeakReference<FileSystemView>(this);
+
+ UIManager.addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent evt) {
+ FileSystemView fileSystemView = weakReference.get();
+
+ if (fileSystemView == null) {
+ // FileSystemView was destroyed
+ UIManager.removePropertyChangeListener(this);
+ } else {
+ if (evt.getPropertyName().equals("lookAndFeel")) {
+ fileSystemView.useSystemExtensionHiding =
+ UIManager.getDefaults().getBoolean("FileChooser.useSystemExtensionHiding");
+ }
+ }
+ }
+ });
+ }
+
/**
* Determines if the given file is a root in the navigatable tree(s).
* Examples: Windows 98 has one root, the Desktop folder. DOS has one root
@@ -170,7 +175,7 @@
if (f != null) {
name = f.getName();
if (!name.equals("..") && !name.equals(".") &&
- (useSystemExtensionsHiding ||
+ (useSystemExtensionHiding ||
!isFileSystem(f) ||
isFileSystemRoot(f)) &&
((f instanceof ShellFolder) ||
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicColorChooserUI.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicColorChooserUI.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,16 +30,12 @@
import javax.swing.event.*;
import javax.swing.border.*;
import javax.swing.plaf.*;
-import java.util.*;
import java.awt.*;
-import java.awt.image.*;
import java.awt.event.*;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
-import java.io.Serializable;
import sun.swing.DefaultLookup;
-import sun.swing.UIAction;
/**
* Provides the basic look and feel for a JColorChooser.
@@ -212,9 +208,24 @@
protected void uninstallListeners() {
chooser.removePropertyChangeListener( propertyChangeListener );
chooser.getSelectionModel().removeChangeListener(previewListener);
+ previewListener = null;
previewPanel.removeMouseListener(getHandler());
}
+ private void selectionChanged(ColorSelectionModel model) {
+ if (this.previewPanel != null) {
+ this.previewPanel.setForeground(model.getSelectedColor());
+ this.previewPanel.repaint();
+ }
+ AbstractColorChooserPanel[] panels = this.chooser.getChooserPanels();
+ if (panels != null) {
+ for (AbstractColorChooserPanel panel : panels) {
+ if (panel != null) {
+ panel.updateChooser();
+ }
+ }
+ }
+ }
private class Handler implements ChangeListener, MouseListener,
PropertyChangeListener {
@@ -222,11 +233,7 @@
// ChangeListener
//
public void stateChanged(ChangeEvent evt) {
- ColorSelectionModel model = (ColorSelectionModel)evt.getSource();
- if (previewPanel != null) {
- previewPanel.setForeground(model.getSelectedColor());
- previewPanel.repaint();
- }
+ selectionChanged((ColorSelectionModel) evt.getSource());
}
//
@@ -302,13 +309,19 @@
newPanels[i].installChooserPanel(chooser);
}
}
-
- if (prop == JColorChooser.PREVIEW_PANEL_PROPERTY) {
+ else if (prop == JColorChooser.PREVIEW_PANEL_PROPERTY) {
if (evt.getNewValue() != previewPanel) {
installPreviewPanel();
}
}
- if (prop == "componentOrientation") {
+ else if (prop == JColorChooser.SELECTION_MODEL_PROPERTY) {
+ ColorSelectionModel oldModel = (ColorSelectionModel) evt.getOldValue();
+ oldModel.removeChangeListener(previewListener);
+ ColorSelectionModel newModel = (ColorSelectionModel) evt.getNewValue();
+ newModel.addChangeListener(previewListener);
+ selectionChanged(newModel);
+ }
+ else if (prop == "componentOrientation") {
ComponentOrientation o =
(ComponentOrientation)evt.getNewValue();
JColorChooser cc = (JColorChooser)evt.getSource();
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java Fri May 16 04:37:47 2008 -0700
@@ -1364,6 +1364,7 @@
"LEFT", "positiveUnitIncrement",
"KP_LEFT", "positiveUnitIncrement",
}),
+ "Slider.onlyLeftMouseButtonDrag", Boolean.TRUE,
// *** Spinner
"Spinner.font", monospacedPlain12,
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicSliderUI.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicSliderUI.java Fri May 16 04:37:47 2008 -0700
@@ -552,20 +552,28 @@
contentRect.height = focusRect.height - (focusInsets.top + focusInsets.bottom);
}
+ private int getTickSpacing() {
+ int majorTickSpacing = slider.getMajorTickSpacing();
+ int minorTickSpacing = slider.getMinorTickSpacing();
+
+ int result;
+
+ if (minorTickSpacing > 0) {
+ result = minorTickSpacing;
+ } else if (majorTickSpacing > 0) {
+ result = majorTickSpacing;
+ } else {
+ result = 0;
+ }
+
+ return result;
+ }
+
protected void calculateThumbLocation() {
if ( slider.getSnapToTicks() ) {
int sliderValue = slider.getValue();
int snappedValue = sliderValue;
- int majorTickSpacing = slider.getMajorTickSpacing();
- int minorTickSpacing = slider.getMinorTickSpacing();
- int tickSpacing = 0;
-
- if ( minorTickSpacing > 0 ) {
- tickSpacing = minorTickSpacing;
- }
- else if ( majorTickSpacing > 0 ) {
- tickSpacing = majorTickSpacing;
- }
+ int tickSpacing = getTickSpacing();
if ( tickSpacing != 0 ) {
// If it's not on a tick, change the value
@@ -1273,28 +1281,34 @@
public void scrollByBlock(int direction) {
synchronized(slider) {
-
- int oldValue = slider.getValue();
int blockIncrement =
(slider.getMaximum() - slider.getMinimum()) / 10;
- if (blockIncrement <= 0 &&
- slider.getMaximum() > slider.getMinimum()) {
-
+ if (blockIncrement == 0) {
blockIncrement = 1;
}
+ if (slider.getSnapToTicks()) {
+ int tickSpacing = getTickSpacing();
+
+ if (blockIncrement < tickSpacing) {
+ blockIncrement = tickSpacing;
+ }
+ }
+
int delta = blockIncrement * ((direction > 0) ? POSITIVE_SCROLL : NEGATIVE_SCROLL);
- slider.setValue(oldValue + delta);
+ slider.setValue(slider.getValue() + delta);
}
}
public void scrollByUnit(int direction) {
synchronized(slider) {
+ int delta = ((direction > 0) ? POSITIVE_SCROLL : NEGATIVE_SCROLL);
- int oldValue = slider.getValue();
- int delta = 1 * ((direction > 0) ? POSITIVE_SCROLL : NEGATIVE_SCROLL);
+ if (slider.getSnapToTicks()) {
+ delta *= getTickSpacing();
+ }
- slider.setValue(oldValue + delta);
+ slider.setValue(slider.getValue() + delta);
}
}
@@ -1573,6 +1587,11 @@
// Clicked in the Thumb area?
if (thumbRect.contains(currentMouseX, currentMouseY)) {
+ if (UIManager.getBoolean("Slider.onlyLeftMouseButtonDrag")
+ && !SwingUtilities.isLeftMouseButton(e)) {
+ return;
+ }
+
switch (slider.getOrientation()) {
case JSlider.VERTICAL:
offset = currentMouseY - thumbRect.y;
@@ -1584,6 +1603,11 @@
isDragging = true;
return;
}
+
+ if (!SwingUtilities.isLeftMouseButton(e)) {
+ return;
+ }
+
isDragging = false;
slider.setValueIsAdjusting(true);
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalIconFactory.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalIconFactory.java Fri May 16 04:37:47 2008 -0700
@@ -2278,18 +2278,16 @@
}
public void paintIcon( Component c, Graphics g, int x, int y ) {
- JSlider slider = (JSlider)c;
-
- boolean leftToRight = MetalUtils.isLeftToRight(slider);
+ boolean leftToRight = MetalUtils.isLeftToRight(c);
g.translate( x, y );
// Draw the frame
- if ( slider.hasFocus() ) {
+ if ( c.hasFocus() ) {
g.setColor( MetalLookAndFeel.getPrimaryControlInfo() );
}
else {
- g.setColor( slider.isEnabled() ? MetalLookAndFeel.getPrimaryControlInfo() :
+ g.setColor( c.isEnabled() ? MetalLookAndFeel.getPrimaryControlInfo() :
MetalLookAndFeel.getControlDarkShadow() );
}
@@ -2309,7 +2307,7 @@
}
// Fill in the background
- if ( slider.hasFocus() ) {
+ if ( c.hasFocus() ) {
g.setColor( c.getForeground() );
}
else {
@@ -2338,8 +2336,8 @@
// Draw the bumps
int offset = (leftToRight) ? 2 : 8;
- if ( slider.isEnabled() ) {
- if ( slider.hasFocus() ) {
+ if ( c.isEnabled() ) {
+ if ( c.hasFocus() ) {
primaryBumps.paintIcon( c, g, offset, 2 );
}
else {
@@ -2348,8 +2346,8 @@
}
// Draw the highlight
- if ( slider.isEnabled() ) {
- g.setColor( slider.hasFocus() ? MetalLookAndFeel.getPrimaryControl()
+ if ( c.isEnabled() ) {
+ g.setColor( c.hasFocus() ? MetalLookAndFeel.getPrimaryControl()
: MetalLookAndFeel.getControlHighlight() );
if (leftToRight) {
g.drawLine( 1, 1, 8, 1 );
@@ -2389,16 +2387,14 @@
}
public void paintIcon( Component c, Graphics g, int x, int y ) {
- JSlider slider = (JSlider)c;
-
g.translate( x, y );
// Draw the frame
- if ( slider.hasFocus() ) {
+ if ( c.hasFocus() ) {
g.setColor( MetalLookAndFeel.getPrimaryControlInfo() );
}
else {
- g.setColor( slider.isEnabled() ? MetalLookAndFeel.getPrimaryControlInfo() :
+ g.setColor( c.isEnabled() ? MetalLookAndFeel.getPrimaryControlInfo() :
MetalLookAndFeel.getControlDarkShadow() );
}
@@ -2409,7 +2405,7 @@
g.drawLine( 7,15 , 14,8 ); // right slant
// Fill in the background
- if ( slider.hasFocus() ) {
+ if ( c.hasFocus() ) {
g.setColor( c.getForeground() );
}
else {
@@ -2425,8 +2421,8 @@
g.drawLine( 7,14 , 7,14 );
// Draw the bumps
- if ( slider.isEnabled() ) {
- if ( slider.hasFocus() ) {
+ if ( c.isEnabled() ) {
+ if ( c.hasFocus() ) {
primaryBumps.paintIcon( c, g, 2, 2 );
}
else {
@@ -2435,8 +2431,8 @@
}
// Draw the highlight
- if ( slider.isEnabled() ) {
- g.setColor( slider.hasFocus() ? MetalLookAndFeel.getPrimaryControl()
+ if ( c.isEnabled() ) {
+ g.setColor( c.hasFocus() ? MetalLookAndFeel.getPrimaryControl()
: MetalLookAndFeel.getControlHighlight() );
g.drawLine( 1, 1, 13, 1 );
g.drawLine( 1, 1, 1, 8 );
--- a/jdk/src/share/classes/javax/swing/table/JTableHeader.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/table/JTableHeader.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,7 @@
import javax.accessibility.*;
import java.beans.PropertyChangeListener;
+import java.beans.Transient;
import java.io.ObjectOutputStream;
import java.io.ObjectInputStream;
@@ -325,6 +326,7 @@
* @return the default renderer
* @since 1.3
*/
+ @Transient
public TableCellRenderer getDefaultRenderer() {
return defaultRenderer;
}
--- a/jdk/src/share/classes/javax/swing/text/JTextComponent.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/text/JTextComponent.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
+import java.beans.Transient;
import java.util.Collections;
import java.util.HashMap;
import java.util.Hashtable;
@@ -571,6 +572,7 @@
*
* @return the caret
*/
+ @Transient
public Caret getCaret() {
return caret;
}
@@ -1349,11 +1351,6 @@
* This is the method that is used by the default implementation
* of the action for inserting content that gets bound to the
* keymap actions.
- * <p>
- * This method is thread safe, although most Swing methods
- * are not. Please see
- * <A HREF="http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html">How
- * to Use Threads</A> for more information.
*
* @param content the content to replace the selection with
*/
@@ -1677,6 +1674,7 @@
* @return the position of the text insertion caret for the
* text component >= 0
*/
+ @Transient
public int getCaretPosition() {
return caret.getDot();
}
@@ -1687,12 +1685,8 @@
* or empty, has the effect of simply deleting the old text.
* When text has been inserted, the resulting caret location
* is determined by the implementation of the caret class.
+ *
* <p>
- * This method is thread safe, although most Swing methods
- * are not. Please see
- * <A HREF="http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html">How
- * to Use Threads</A> for more information.
- *
* Note that text is not a bound property, so no <code>PropertyChangeEvent
* </code> is fired when it changes. To listen for changes to the text,
* use <code>DocumentListener</code>.
@@ -1806,6 +1800,7 @@
*
* @return the start position >= 0
*/
+ @Transient
public int getSelectionStart() {
int start = Math.min(caret.getDot(), caret.getMark());
return start;
@@ -1838,6 +1833,7 @@
*
* @return the end position >= 0
*/
+ @Transient
public int getSelectionEnd() {
int end = Math.max(caret.getDot(), caret.getMark());
return end;
--- a/jdk/src/share/classes/sun/swing/FilePane.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/sun/swing/FilePane.java Fri May 16 04:37:47 2008 -0700
@@ -1285,7 +1285,6 @@
int lastIndex = -1;
File editFile = null;
- int editX = 20;
private int getEditIndex() {
return lastIndex;
@@ -1315,7 +1314,9 @@
* @param index visual index of the file to be edited
*/
private void editFileName(int index) {
- File currentDirectory = getFileChooser().getCurrentDirectory();
+ JFileChooser chooser = getFileChooser();
+ File currentDirectory = chooser.getCurrentDirectory();
+
if (readOnly || !canWrite(currentDirectory)) {
return;
}
@@ -1332,9 +1333,15 @@
editCell.setNextFocusableComponent(list);
}
list.add(editCell);
- editCell.setText(getFileChooser().getName(editFile));
+ editCell.setText(chooser.getName(editFile));
ComponentOrientation orientation = list.getComponentOrientation();
editCell.setComponentOrientation(orientation);
+
+ Icon icon = chooser.getIcon(editFile);
+
+ // PENDING - grab padding (4) below from defaults table.
+ int editX = icon == null ? 20 : icon.getIconWidth() + 4;
+
if (orientation.isLeftToRight()) {
editCell.setBounds(editX + r.x, r.y, r.width - editX, r.height);
} else {
@@ -1458,11 +1465,6 @@
Icon icon = getFileChooser().getIcon(file);
if (icon != null) {
setIcon(icon);
-
- if (isSelected) {
- // PENDING - grab padding (4) below from defaults table.
- editX = icon.getIconWidth() + 4;
- }
} else {
if (getFileChooser().getFileSystemView().isTraversable(file)) {
setText(fileName+File.separator);
--- a/jdk/src/share/classes/sun/swing/WindowsPlacesBar.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/share/classes/sun/swing/WindowsPlacesBar.java Fri May 16 04:37:47 2008 -0700
@@ -93,11 +93,18 @@
if (index >= 0 && index < folderName.length() - 1) {
folderName = folderName.substring(index + 1);
}
- Icon icon = null;
+ Icon icon;
if (files[i] instanceof ShellFolder) {
// We want a large icon, fsv only gives us a small.
ShellFolder sf = (ShellFolder)files[i];
- icon = new ImageIcon(sf.getIcon(true), sf.getFolderType());
+ Image image = sf.getIcon(true);
+
+ if (image == null) {
+ // Get default image
+ image = (Image) ShellFolder.get("shell32LargeIcon 1");
+ }
+
+ icon = image == null ? null : new ImageIcon(image, sf.getFolderType());
} else {
icon = fsv.getSystemIcon(files[i]);
}
--- a/jdk/src/solaris/native/sun/awt/gtk2_interface.c Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/solaris/native/sun/awt/gtk2_interface.c Fri May 16 04:37:47 2008 -0700
@@ -333,6 +333,7 @@
static GdkPixbuf* (*fp_gtk_widget_render_icon)(GtkWidget *widget,
const gchar *stock_id, GtkIconSize size, const gchar *detail);
static void (*fp_gtk_widget_set_name)(GtkWidget *widget, const gchar *name);
+static void (*fp_gtk_widget_set_parent)(GtkWidget *widget, GtkWidget *parent);
static void (*fp_gtk_widget_set_direction)(GtkWidget *widget,
GtkTextDirection direction);
static void (*fp_gtk_widget_style_get)(GtkWidget *widget,
@@ -570,6 +571,8 @@
dl_symbol("gtk_widget_render_icon");
fp_gtk_widget_set_name =
dl_symbol("gtk_widget_set_name");
+ fp_gtk_widget_set_parent =
+ dl_symbol("gtk_widget_set_parent");
fp_gtk_widget_set_direction =
dl_symbol("gtk_widget_set_direction");
fp_gtk_widget_style_get =
@@ -1040,7 +1043,7 @@
(NULL == gtk2_widgets[_GTK_COMBO_BOX_ARROW_BUTTON_TYPE]))
{
gtk2_widgets[_GTK_COMBO_BOX_ARROW_BUTTON_TYPE] =
- (*fp_gtk_button_new)();
+ (*fp_gtk_toggle_button_new)();
}
result = gtk2_widgets[_GTK_COMBO_BOX_ARROW_BUTTON_TYPE];
break;
@@ -1414,12 +1417,20 @@
widget_type == COMBO_BOX_TEXT_FIELD)
{
/*
- * We add a regular GtkButton/GtkEntry to a GtkComboBoxEntry
- * in order to trick engines into thinking it's a real combobox
- * arrow button/text field.
- */
+ * We add a regular GtkButton/GtkEntry to a GtkComboBoxEntry
+ * in order to trick engines into thinking it's a real combobox
+ * arrow button/text field.
+ */
GtkWidget *combo = (*fp_gtk_combo_box_entry_new)();
- (*fp_gtk_container_add)((GtkContainer *)combo, result);
+
+ if (widget_type == COMBO_BOX_TEXT_FIELD)
+ (*fp_gtk_container_add)((GtkContainer *)combo, result);
+ else
+ {
+ (*fp_gtk_widget_set_parent)(result, combo);
+ ((GtkBin*)combo)->child = result;
+ }
+
(*fp_gtk_container_add)((GtkContainer *)gtk2_fixed, combo);
(*fp_gtk_widget_realize)(result);
return result;
--- a/jdk/src/windows/classes/sun/awt/shell/Win32ShellFolder2.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/windows/classes/sun/awt/shell/Win32ShellFolder2.java Fri May 16 04:37:47 2008 -0700
@@ -910,18 +910,20 @@
/**
* Gets an icon from the Windows system icon list as an <code>Image</code>
*/
- static Image getShell32Icon(int iconID) {
+ static Image getShell32Icon(int iconID, boolean getLargeIcon) {
boolean useVGAColors = true; // Will be ignored on XP and later
+ int size = getLargeIcon ? 32 : 16;
+
Toolkit toolkit = Toolkit.getDefaultToolkit();
String shellIconBPP = (String)toolkit.getDesktopProperty("win.icon.shellIconBPP");
if (shellIconBPP != null) {
useVGAColors = shellIconBPP.equals("4");
}
- long hIcon = getIconResource("shell32.dll", iconID, 16, 16, useVGAColors);
+ long hIcon = getIconResource("shell32.dll", iconID, size, size, useVGAColors);
if (hIcon != 0) {
- Image icon = makeIcon(hIcon, false);
+ Image icon = makeIcon(hIcon, getLargeIcon);
disposeIcon(hIcon);
return icon;
}
--- a/jdk/src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java Fri May 16 04:37:47 2008 -0700
@@ -313,13 +313,12 @@
return null;
}
return Win32ShellFolder2.getSystemIcon(iconType);
- } else if (key.startsWith("shell32Icon ")) {
- int i;
- String name = key.substring(key.indexOf(" ")+1);
+ } else if (key.startsWith("shell32Icon ") || key.startsWith("shell32LargeIcon ")) {
+ String name = key.substring(key.indexOf(" ") + 1);
try {
- i = Integer.parseInt(name);
+ int i = Integer.parseInt(name);
if (i >= 0) {
- return Win32ShellFolder2.getShell32Icon(i);
+ return Win32ShellFolder2.getShell32Icon(i, key.startsWith("shell32LargeIcon "));
}
} catch (NumberFormatException ex) {
}
--- a/jdk/test/java/beans/Introspector/BeanUtils.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/test/java/beans/Introspector/BeanUtils.java Fri May 16 04:37:47 2008 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -21,6 +21,7 @@
* have any questions.
*/
+import java.beans.BeanDescriptor;
import java.beans.EventSetDescriptor;
import java.beans.IndexedPropertyDescriptor;
import java.beans.IntrospectionException;
@@ -39,13 +40,26 @@
}
/**
+ * Returns a bean descriptor for specified class.
+ *
+ * @param type the class to introspect
+ * @return a bean descriptor
+ */
+ public static BeanDescriptor getBeanDescriptor(Class type) {
+ try {
+ return Introspector.getBeanInfo(type).getBeanDescriptor();
+ } catch (IntrospectionException exception) {
+ throw new Error("unexpected exception", exception);
+ }
+ }
+
+ /**
* Returns an array of property descriptors for specified class.
*
* @param type the class to introspect
* @return an array of property descriptors
*/
public static PropertyDescriptor[] getPropertyDescriptors(Class type) {
- System.out.println(type);
try {
return Introspector.getBeanInfo(type).getPropertyDescriptors();
} catch (IntrospectionException exception) {
@@ -54,6 +68,38 @@
}
/**
+ * Returns an array of event set descriptors for specified class.
+ *
+ * @param type the class to introspect
+ * @return an array of event set descriptors
+ */
+ public static EventSetDescriptor[] getEventSetDescriptors(Class type) {
+ try {
+ return Introspector.getBeanInfo(type).getEventSetDescriptors();
+ } catch (IntrospectionException exception) {
+ throw new Error("unexpected exception", exception);
+ }
+ }
+
+ /**
+ * Finds an event set descriptor for the class
+ * that matches the event set name.
+ *
+ * @param type the class to introspect
+ * @param name the name of the event set to search
+ * @return the {@code EventSetDescriptor} or {@code null}
+ */
+ public static EventSetDescriptor findEventSetDescriptor(Class type, String name) {
+ EventSetDescriptor[] esds = getEventSetDescriptors(type);
+ for (EventSetDescriptor esd : esds) {
+ if (esd.getName().equals(name)) {
+ return esd;
+ }
+ }
+ return null;
+ }
+
+ /**
* Finds a property descriptor for the class
* that matches the property name.
*
@@ -72,6 +118,22 @@
}
/**
+ * Returns a event set descriptor for the class
+ * that matches the property name.
+ *
+ * @param type the class to introspect
+ * @param name the name of the event set to search
+ * @return the {@code EventSetDescriptor}
+ */
+ public static EventSetDescriptor getEventSetDescriptor(Class type, String name) {
+ EventSetDescriptor esd = findEventSetDescriptor(type, name);
+ if (esd != null) {
+ return esd;
+ }
+ throw new Error("could not find event set '" + name + "' in " + type);
+ }
+
+ /**
* Returns a property descriptor for the class
* that matches the property name.
*
--- a/jdk/test/java/beans/Introspector/Test4896879.java Thu May 15 11:34:11 2008 +0400
+++ b/jdk/test/java/beans/Introspector/Test4896879.java Fri May 16 04:37:47 2008 -0700
@@ -28,22 +28,16 @@
* @author Mark Davidson
*/
-import java.beans.BeanInfo;
-import java.beans.EventSetDescriptor;
-import java.beans.IntrospectionException;
-import java.beans.Introspector;
import java.util.EventListener;
public class Test4896879 {
- public static void main(String[] args) throws IntrospectionException {
+ public static void main(String[] args) {
test(A.class);
test(B.class);
}
- private static void test(Class type) throws IntrospectionException {
- BeanInfo info = Introspector.getBeanInfo(type);
- EventSetDescriptor[] descriptors = info.getEventSetDescriptors();
- if (descriptors.length != 0) {
+ private static void test(Class type) {
+ if (BeanUtils.getEventSetDescriptors(type).length != 0) {
throw new Error("Should not have any EventSetDescriptors");
}
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/Introspector/Test4935607.java Fri May 16 04:37:47 2008 -0700
@@ -0,0 +1,404 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test %I% %G%
+ * @bug 4935607
+ * @summary Tests transient properties
+ * @author Sergey Malenkov
+ */
+
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.ScrollPane;
+import java.awt.geom.RectangularShape;
+import java.awt.im.InputContext;
+
+import java.beans.FeatureDescriptor;
+import java.beans.Transient;
+
+import java.util.EventListener;
+
+import javax.swing.AbstractButton;
+import javax.swing.DefaultListSelectionModel;
+import javax.swing.ImageIcon;
+import javax.swing.JComboBox;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JMenuBar;
+import javax.swing.JScrollPane;
+import javax.swing.JTabbedPane;
+import javax.swing.JViewport;
+import javax.swing.table.JTableHeader;
+import javax.swing.text.JTextComponent;
+
+public class Test4935607 {
+ public static void main(String[] args) {
+ // test all possible cases
+ test(Null.class);
+ test(True.class);
+ test(False.class);
+ test(NullNull.class);
+ test(TrueNull.class);
+ test(FalseNull.class);
+ test(NullTrue.class);
+ test(TrueTrue.class);
+ test(FalseTrue.class);
+ test(NullFalse.class);
+ test(TrueFalse.class);
+ test(FalseFalse.class);
+ // test transient properties in AWT
+ test(RectangularShape.class, "frame"); // NON-NLS: getFrame()
+ test(Rectangle.class, "bounds"); // NON-NLS: getBounds()
+ test(Dimension.class, "size"); // NON-NLS: getSize()
+ test(Point.class, "location"); // NON-NLS: getLocation()
+ test(Component.class, "foreground"); // NON-NLS: getForeground()
+ test(Component.class, "background"); // NON-NLS: getBackground()
+ test(Component.class, "font"); // NON-NLS: getFont()
+ test(Component.class, "visible"); // NON-NLS: getVisible()
+ test(ScrollPane.class, "scrollPosition"); // NON-NLS: getScrollPosition()
+ test(InputContext.class, "compositionEnabled"); // NON-NLS: getCompositionEnabled()
+ // test transient properties in Swing
+ test(JComponent.class, "minimumSize"); // NON-NLS: getMinimumSize()
+ test(JComponent.class, "preferredSize"); // NON-NLS: getPreferredSize()
+ test(JComponent.class, "maximumSize"); // NON-NLS: getMaximumSize()
+ test(ImageIcon.class, "image"); // NON-NLS: getImage()
+ test(ImageIcon.class, "imageObserver"); // NON-NLS: getImageObserver()
+ test(JMenuBar.class, "helpMenu"); // NON-NLS: getHelpMenu()
+ test(JScrollPane.class, "verticalScrollBar"); // NON-NLS: getVerticalScrollBar()
+ test(JScrollPane.class, "horizontalScrollBar"); // NON-NLS: getHorizontalScrollBar()
+ test(JScrollPane.class, "rowHeader"); // NON-NLS: getRowHeader()
+ test(JScrollPane.class, "columnHeader"); // NON-NLS: getColumnHeader()
+ test(JViewport.class, "extentSize"); // NON-NLS: getExtentSize()
+ test(JTableHeader.class, "defaultRenderer"); // NON-NLS: getDefaultRenderer()
+ test(JList.class, "cellRenderer"); // NON-NLS: getCellRenderer()
+ test(JList.class, "selectedIndices"); // NON-NLS: getSelectedIndices()
+ test(DefaultListSelectionModel.class, "leadSelectionIndex"); // NON-NLS: getLeadSelectionIndex()
+ test(DefaultListSelectionModel.class, "anchorSelectionIndex"); // NON-NLS: getAnchorSelectionIndex()
+ test(JComboBox.class, "selectedIndex"); // NON-NLS: getSelectedIndex()
+ test(JTabbedPane.class, "selectedIndex"); // NON-NLS: getSelectedIndex()
+ test(JTabbedPane.class, "selectedComponent"); // NON-NLS: getSelectedComponent()
+ test(AbstractButton.class, "disabledIcon"); // NON-NLS: getDisabledIcon()
+ test(JLabel.class, "disabledIcon"); // NON-NLS: getDisabledIcon()
+ test(JTextComponent.class, "caret"); // NON-NLS: getCaret()
+ test(JTextComponent.class, "caretPosition"); // NON-NLS: getCaretPosition()
+ test(JTextComponent.class, "selectionStart"); // NON-NLS: getSelectionStart()
+ test(JTextComponent.class, "selectionEnd"); // NON-NLS: getSelectionEnd()
+ }
+
+ private static void test(Class type) {
+ Object value = getExpectedValue(type);
+ test(value, BeanUtils.getPropertyDescriptor(type, "property")); // NON-NLS: the property to check
+ test(value, BeanUtils.getEventSetDescriptor(type, "eventSet")); // NON-NLS: the event set to check
+ System.out.println();
+ }
+
+ private static void test(Class type, String property) {
+ System.out.print(type.getName() + ": ");
+ test(Boolean.TRUE, BeanUtils.getPropertyDescriptor(type, property));
+ }
+
+ private static void test(Object expected, FeatureDescriptor fd) {
+ System.out.println(fd.getName());
+ Object actual = fd.getValue("transient"); // NON-NLS: the attribute name
+ if ((actual == null) ? (expected != null) : !actual.equals(expected))
+ throw new Error("expected " + expected + " value, but actual value is " + actual);
+ }
+
+ private static Object getExpectedValue(Class type) {
+ try {
+ return type.getField("VALUE").get(type); // NON-NLS: the field name with expected value
+ } catch (NoSuchFieldException exception) {
+ return null;
+ } catch (IllegalAccessException exception) {
+ throw new Error("unexpected error", exception);
+ }
+ }
+
+
+ public static class Null {
+ public Object getProperty() {
+ return this;
+ }
+
+ public void setProperty(Object object) {
+ }
+
+ public void addEventSetListener(EventSetListener listener) {
+ }
+
+ public void removeEventSetListener(EventSetListener listener) {
+ }
+ }
+
+ public static class True {
+ public static final Boolean VALUE = Boolean.TRUE;
+
+ @Transient
+ public Object getProperty() {
+ return this;
+ }
+
+ @Transient
+ public void setProperty(Object object) {
+ }
+
+ @Transient
+ public void addEventSetListener(EventSetListener listener) {
+ }
+
+ @Transient
+ public void removeEventSetListener(EventSetListener listener) {
+ }
+ }
+
+ public static class False {
+ public static final Boolean VALUE = Boolean.FALSE;
+
+ @Transient(false)
+ public Object getProperty() {
+ return this;
+ }
+
+ @Transient(false)
+ public void setProperty(Object object) {
+ }
+
+ @Transient(false)
+ public void addEventSetListener(EventSetListener listener) {
+ }
+
+ @Transient(false)
+ public void removeEventSetListener(EventSetListener listener) {
+ }
+ }
+
+ public static class NullNull extends Null {
+ @Override
+ public Object getProperty() {
+ return this;
+ }
+
+ @Override
+ public void setProperty(Object object) {
+ }
+
+ @Override
+ public void addEventSetListener(EventSetListener listener) {
+ }
+
+ @Override
+ public void removeEventSetListener(EventSetListener listener) {
+ }
+ }
+
+ public static class TrueNull extends Null {
+ public static final Boolean VALUE = Boolean.TRUE;
+
+ @Override
+ @Transient
+ public Object getProperty() {
+ return this;
+ }
+
+ @Override
+ @Transient
+ public void setProperty(Object object) {
+ }
+
+ @Override
+ @Transient
+ public void addEventSetListener(EventSetListener listener) {
+ }
+
+ @Override
+ @Transient
+ public void removeEventSetListener(EventSetListener listener) {
+ }
+ }
+
+ public static class FalseNull extends Null {
+ public static final Boolean VALUE = Boolean.FALSE;
+
+ @Override
+ @Transient(false)
+ public Object getProperty() {
+ return this;
+ }
+
+ @Override
+ @Transient(false)
+ public void setProperty(Object object) {
+ }
+
+ @Override
+ @Transient(false)
+ public void addEventSetListener(EventSetListener listener) {
+ }
+
+ @Override
+ @Transient(false)
+ public void removeEventSetListener(EventSetListener listener) {
+ }
+ }
+
+ public static class NullTrue extends True {
+ @Override
+ public Object getProperty() {
+ return this;
+ }
+
+ @Override
+ public void setProperty(Object object) {
+ }
+
+ @Override
+ public void addEventSetListener(EventSetListener listener) {
+ }
+
+ @Override
+ public void removeEventSetListener(EventSetListener listener) {
+ }
+ }
+
+ public static class TrueTrue extends True {
+ @Override
+ @Transient
+ public Object getProperty() {
+ return this;
+ }
+
+ @Override
+ @Transient
+ public void setProperty(Object object) {
+ }
+
+ @Override
+ @Transient
+ public void addEventSetListener(EventSetListener listener) {
+ }
+
+ @Override
+ @Transient
+ public void removeEventSetListener(EventSetListener listener) {
+ }
+ }
+
+ public static class FalseTrue extends True {
+ public static final Boolean VALUE = Boolean.FALSE;
+
+ @Override
+ @Transient(false)
+ public Object getProperty() {
+ return this;
+ }
+
+ @Override
+ @Transient(false)
+ public void setProperty(Object object) {
+ }
+
+ @Override
+ @Transient(false)
+ public void addEventSetListener(EventSetListener listener) {
+ }
+
+ @Override
+ @Transient(false)
+ public void removeEventSetListener(EventSetListener listener) {
+ }
+ }
+
+ public static class NullFalse extends False {
+ @Override
+ public Object getProperty() {
+ return this;
+ }
+
+ @Override
+ public void setProperty(Object object) {
+ }
+
+ @Override
+ public void addEventSetListener(EventSetListener listener) {
+ }
+
+ @Override
+ public void removeEventSetListener(EventSetListener listener) {
+ }
+ }
+
+ public static class TrueFalse extends False {
+ public static final Boolean VALUE = Boolean.TRUE;
+
+ @Override
+ @Transient
+ public Object getProperty() {
+ return this;
+ }
+
+ @Override
+ @Transient
+ public void setProperty(Object object) {
+ }
+
+ @Override
+ @Transient
+ public void addEventSetListener(EventSetListener listener) {
+ }
+
+ @Override
+ @Transient
+ public void removeEventSetListener(EventSetListener listener) {
+ }
+ }
+
+ public static class FalseFalse extends False {
+ @Override
+ @Transient(false)
+ public Object getProperty() {
+ return this;
+ }
+
+ @Override
+ @Transient(false)
+ public void setProperty(Object object) {
+ }
+
+ @Override
+ @Transient(false)
+ public void addEventSetListener(EventSetListener listener) {
+ }
+
+ @Override
+ @Transient(false)
+ public void removeEventSetListener(EventSetListener listener) {
+ }
+ }
+
+ public static final class EventSetListener implements EventListener {
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/XMLEncoder/Test4935607.java Fri May 16 04:37:47 2008 -0700
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test %I% %G%
+ * @bug 4935607
+ * @summary Tests transient properties
+ * @author Sergey Malenkov
+ */
+
+import java.beans.Transient;
+
+public class Test4935607 extends AbstractTest<Test4935607.TransientBean> {
+ public static void main(String[] args) {
+ new Test4935607().test(true);
+ }
+
+ @Override
+ protected TransientBean getObject() {
+ TransientBean bean = new TransientBean();
+ bean.setName("some string"); // NON-NLS: some string
+ return bean;
+ }
+
+ @Override
+ protected TransientBean getAnotherObject() {
+ TransientBean bean = new TransientBean();
+ bean.setName("another string"); // NON-NLS: another string
+ bean.setComment("some comment"); // NON-NLS: some comment
+ return bean;
+ }
+
+ @Override
+ protected void validate(TransientBean before, TransientBean after) {
+ if (!before.getName().equals(after.getName()))
+ throw new Error("the name property incorrectly encoded");
+
+ if (null != after.getComment())
+ throw new Error("the comment property should be encoded");
+ }
+
+ public static class TransientBean {
+ private String name;
+ private String comment;
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Transient
+ public String getComment() {
+ return this.comment;
+ }
+
+ public void setComment(String comment) {
+ this.comment = comment;
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JColorChooser/Test6348456.html Fri May 16 04:37:47 2008 -0700
@@ -0,0 +1,9 @@
+<html>
+<body>
+When applet starts, you'll see that the preview is white.
+When you swap models, you'll see that the preview color is changed.
+
+<applet width="500" height="400" code="Test6348456.class">
+</applet>
+</body>
+</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JColorChooser/Test6348456.java Fri May 16 04:37:47 2008 -0700
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6348456
+ * @summary Tests model changing
+ * @author Sergey Malenkov
+ * @run applet/manual=yesno Test6348456.html
+ */
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import javax.swing.JApplet;
+import javax.swing.JButton;
+import javax.swing.JColorChooser;
+import javax.swing.colorchooser.DefaultColorSelectionModel;
+
+public final class Test6348456 extends JApplet implements ActionListener {
+
+ private static final DefaultColorSelectionModel WHITE = new DefaultColorSelectionModel(Color.WHITE);
+ private static final DefaultColorSelectionModel BLACK = new DefaultColorSelectionModel(Color.BLACK);
+
+ private JColorChooser chooser;
+
+ @Override
+ public void init() {
+ JButton button = new JButton("Swap models");
+ button.addActionListener(this);
+
+ this.chooser = new JColorChooser(Color.RED);
+ this.chooser.setSelectionModel(WHITE);
+
+ add(BorderLayout.NORTH, button);
+ add(BorderLayout.CENTER, this.chooser);
+ }
+
+ public void actionPerformed(ActionEvent event){
+ this.chooser.setSelectionModel(this.chooser.getSelectionModel() == BLACK ? WHITE : BLACK);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JEditorPane/bug4714674.java Fri May 16 04:37:47 2008 -0700
@@ -0,0 +1,124 @@
+/* @test
+ @bug 4714674
+ @summary Tests that JEditorPane opens HTTP connection asynchronously
+ @author Peter Zhelezniakov
+ @run main bug4714674
+*/
+
+import javax.swing.*;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+import com.sun.net.httpserver.HttpServer;
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.util.concurrent.Executors;
+
+
+public class bug4714674 {
+
+ public static void main(String[] args) throws Exception {
+ new bug4714674().test();
+ }
+
+ private void test() throws Exception {
+ final DeafServer server = new DeafServer();
+ final String baseURL = "http://localhost:" + server.getPort() + "/";
+
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ try {
+ JEditorPane pane = new JEditorPane();
+ ((javax.swing.text.AbstractDocument)pane.getDocument()).
+ setAsynchronousLoadPriority(1);
+
+ // this will block EDT unless 4714674 is fixed
+ pane.setPage(baseURL);
+ } catch (IOException e) {
+ // should not happen
+ throw new Error(e);
+ }
+ }
+ });
+
+ // if 4714674 is fixed, this executes before connection times out
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ synchronized (server) {
+ server.wakeup = true;
+ server.notifyAll();
+ }
+ pass();
+ }
+ });
+
+ // wait, then check test status
+ try {
+ Thread.sleep(5000);
+ if (!passed()) {
+ throw new RuntimeException("Failed: EDT was blocked");
+ }
+ } finally {
+ server.destroy();
+ }
+ }
+
+ private boolean passed = false;
+
+ private synchronized boolean passed() {
+ return passed;
+ }
+
+ private synchronized void pass() {
+ passed = true;
+ }
+}
+
+/**
+ * A "deaf" HTTP server that does not respond to requests.
+ */
+class DeafServer {
+ HttpServer server;
+ boolean wakeup = false;
+
+ /**
+ * Create and start the HTTP server.
+ */
+ public DeafServer() throws IOException {
+ InetSocketAddress addr = new InetSocketAddress(0);
+ server = HttpServer.create(addr, 0);
+ HttpHandler handler = new DeafHandler();
+ server.createContext("/", handler);
+ server.setExecutor(Executors.newCachedThreadPool());
+ server.start();
+ }
+
+ /**
+ * Stop server without any delay.
+ */
+ public void destroy() {
+ server.stop(0);
+ }
+
+ /**
+ * Return actual server port number, useful for constructing request URIs.
+ */
+ public int getPort() {
+ return server.getAddress().getPort();
+ }
+
+
+ class DeafHandler implements HttpHandler {
+ public void handle(HttpExchange r) throws IOException {
+ synchronized (DeafServer.this) {
+ while (! wakeup) {
+ try {
+ DeafServer.this.wait();
+ } catch (InterruptedException e) {
+ // just wait again
+ }
+ }
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JFileChooser/4252173/bug4252173.java Fri May 16 04:37:47 2008 -0700
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 4252173
+ @summary Inability to reuse the HorizontalSliderThumbIcon
+ @author Pavel Porvatov
+ @run main bug4252173
+*/
+
+import javax.swing.*;
+import javax.swing.plaf.metal.DefaultMetalTheme;
+import javax.swing.plaf.metal.MetalLookAndFeel;
+import java.awt.*;
+import java.awt.image.BufferedImage;
+import java.lang.reflect.InvocationTargetException;
+
+public class bug4252173 {
+ public static void main(String[] args) throws InvocationTargetException, InterruptedException {
+ SwingUtilities.invokeAndWait(new Runnable() {
+ public void run() {
+ MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
+
+ JComponent component = new JLabel();
+
+ Icon horizontalThumbIcon = UIManager.getIcon("Slider.horizontalThumbIcon");
+
+ Icon verticalThumbIcon = UIManager.getIcon("Slider.verticalThumbIcon");
+
+ Graphics g = new BufferedImage(100, 100, BufferedImage.TYPE_4BYTE_ABGR).getGraphics();
+
+ horizontalThumbIcon.paintIcon(component, g, 0, 0);
+
+ verticalThumbIcon.paintIcon(component, g, 0, 0);
+ }
+ });
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JFileChooser/6524424/bug6524424.html Fri May 16 04:37:47 2008 -0700
@@ -0,0 +1,11 @@
+<html>
+<body>
+<applet code="bug6524424.class" width=200 height=200></applet>
+To test fix follow the next steps:
+1. Select a slider (do the next steps for every slider)
+2. Check that the next keyboard buttons work correctly:
+ Up, Down, Left, Right, Page Up, Page Down
+3. Press left mouse button on a free space of the slider and check
+ that thumb moves correctly
+</body>
+</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JFileChooser/6524424/bug6524424.java Fri May 16 04:37:47 2008 -0700
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6524424
+ * @summary JSlider Clicking In Tracks Behavior Inconsistent For Different Tick Spacings
+ * @author Pavel Porvatov
+ * @run applet/manual=done bug6524424.html
+ */
+
+import java.awt.*;
+import javax.swing.*;
+
+import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
+
+public class bug6524424 extends JApplet {
+ public static void main(String[] args) {
+ try {
+ UIManager.setLookAndFeel(new WindowsLookAndFeel());
+ } catch (UnsupportedLookAndFeelException e) {
+ e.printStackTrace();
+
+ return;
+ }
+
+ TestPanel panel = new TestPanel();
+
+ JFrame frame = new JFrame();
+
+ frame.setContentPane(panel);
+ frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
+ frame.pack();
+ frame.setLocationRelativeTo(null);
+
+ frame.setVisible(true);
+ }
+
+ public void init() {
+ TestPanel panel = new TestPanel();
+
+ setContentPane(panel);
+ }
+
+ private static class TestPanel extends JPanel {
+
+ private TestPanel() {
+ super(new GridBagLayout());
+
+ JSlider slider1 = createSlider(1, 2);
+ JSlider slider2 = createSlider(2, 4);
+ JSlider slider3 = createSlider(3, 6);
+
+ addComponent(this, slider1);
+ addComponent(this, slider2);
+ addComponent(this, slider3);
+ }
+
+ private JSlider createSlider(int tickMinor, int tickMajor) {
+ JSlider result = new JSlider();
+
+ result.setPaintLabels(true);
+ result.setPaintTicks(true);
+ result.setSnapToTicks(true);
+ result.setMinimum(0);
+ result.setMaximum(12);
+ result.setMinorTickSpacing(tickMinor);
+ result.setMajorTickSpacing(tickMajor);
+
+ return result;
+ }
+ }
+
+ private static void addComponent(JPanel panel, Component component) {
+ panel.add(component, new GridBagConstraints(0,
+ panel.getComponentCount(), 1, 1,
+ 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
+ new Insets(0, 0, 0, 0), 0, 0));
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JFileChooser/6688203/bug6688203.java Fri May 16 04:37:47 2008 -0700
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 6688203
+ @summary Memory leak and performance problems in the method getFileSystemView of FileSystemView
+ @author Pavel Porvatov
+ @run main bug6688203
+*/
+
+import javax.swing.*;
+import javax.swing.filechooser.FileSystemView;
+import java.io.File;
+import java.lang.reflect.Field;
+
+public class bug6688203 {
+ public static void main(String[] args) {
+ // Create an instance of FileSystemView
+ FileSystemView.getFileSystemView();
+
+ int startCount = UIManager.getPropertyChangeListeners().length;
+
+ for (int i = 0; i < 100; i++) {
+ FileSystemView.getFileSystemView();
+ }
+
+ if (startCount != UIManager.getPropertyChangeListeners().length) {
+ throw new RuntimeException("New listeners were added into UIManager");
+ }
+
+ FileSystemView fileSystemView = FileSystemView.getFileSystemView();
+ File file = new File("Some file");
+
+ for (UIManager.LookAndFeelInfo lafInfo : UIManager.getInstalledLookAndFeels()) {
+ try {
+ UIManager.setLookAndFeel(lafInfo.getClassName());
+ } catch (Exception e) {
+ // Ignore such errors
+ System.out.println("Cannot set LAF " + lafInfo.getName());
+
+ continue;
+ }
+
+ fileSystemView.getSystemDisplayName(file);
+
+ try {
+ Field field = FileSystemView.class.getDeclaredField("useSystemExtensionHiding");
+
+ field.setAccessible(true);
+
+ Boolean value = field.getBoolean(fileSystemView);
+
+ if (value != UIManager.getDefaults().getBoolean("FileChooser.useSystemExtensionHiding")) {
+ throw new RuntimeException("Invalid cached value of the FileSystemView.useSystemExtensionHiding field");
+ }
+ } catch (Exception e) {
+ throw new RuntimeException("Cannot read the FileSystemView.useSystemExtensionHiding field", e);
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JPopupMenu/6675802/bug6675802.java Fri May 16 04:37:47 2008 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6675802
+ * @summary Checks that there is no AccessControlException when
+ * a heaviweight popup menu is shown from an applet.
+ * @author Mikhail Lapshin
+ * @run main bug6675802
+ */
+
+import javax.swing.*;
+
+public class bug6675802 {
+ public static void main(String[] args) {
+ System.setSecurityManager(new SecurityManager());
+ final JPopupMenu popupMenu = new JPopupMenu();
+ popupMenu.add(new JMenuItem("Click"));
+ popupMenu.show(null, 0, 0);
+ System.out.println("Test passed");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JPopupMenu/6690791/bug6690791.java Fri May 16 04:37:47 2008 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6690791
+ * @summary Checks that there is no ClassCastException
+ * in MenuSelectionManager.processMouseEvent()
+ * @author Mikhail Lapshin
+ * @run main bug6690791
+ */
+
+import javax.swing.*;
+import java.awt.event.MouseEvent;
+
+public class bug6690791 {
+ public static void main(String[] args) throws Exception {
+ MouseEvent me = new MouseEvent(new JLabel(), MouseEvent.MOUSE_CLICKED,
+ System.currentTimeMillis(), MouseEvent.ALT_MASK,
+ 10, 10, 100, 100, 1, false, MouseEvent.BUTTON1);
+ me.setSource(new Object());
+ MenuSelectionManager.defaultManager().processMouseEvent(me);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JPopupMenu/6691503/bug6691503.java Fri May 16 04:37:47 2008 -0700
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6691503
+ * @summary Checks that there is no opportunity for a malicious applet
+ * to show a popup menu which has whole screen size.
+ * a heaviweight popup menu is shown from an applet.
+ * @author Mikhail Lapshin
+ * @run main bug6691503
+ */
+
+import sun.awt.SunToolkit;
+
+import javax.swing.*;
+import java.awt.*;
+
+public class bug6691503 {
+ private JPopupMenu popupMenu;
+ private JFrame frame;
+ private boolean isAlwaysOnTop1 = false;
+ private boolean isAlwaysOnTop2 = true;
+
+ public static void main(String[] args) {
+ bug6691503 test = new bug6691503();
+ test.setupUI();
+ test.testApplication();
+ test.testApplet();
+ test.checkResult();
+ test.stopEDT();
+ }
+
+ private void setupUI() {
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ frame = new JFrame();
+ frame.setVisible(true);
+ popupMenu = new JPopupMenu();
+ JMenuItem click = new JMenuItem("Click");
+ popupMenu.add(click);
+ }
+ });
+ }
+
+ private void testApplication() {
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ popupMenu.show(frame, 0, 0);
+ Window popupWindow = (Window)
+ (popupMenu.getParent().getParent().getParent().getParent());
+ isAlwaysOnTop1 = popupWindow.isAlwaysOnTop();
+ System.out.println(
+ "Application: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop1);
+ popupMenu.setVisible(false);
+ }
+ });
+ }
+
+ private void testApplet() {
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ System.setSecurityManager(new SecurityManager());
+ popupMenu.show(frame, 0, 0);
+ Window popupWindow = (Window)
+ (popupMenu.getParent().getParent().getParent().getParent());
+ isAlwaysOnTop2 = popupWindow.isAlwaysOnTop();
+ System.out.println(
+ "Applet: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop2);
+ popupMenu.setVisible(false);
+ }
+ });
+ }
+
+ private void checkResult() {
+ ((SunToolkit)(Toolkit.getDefaultToolkit())).realSync();
+ if (!isAlwaysOnTop1 || isAlwaysOnTop2) {
+ throw new RuntimeException("Malicious applet can show always-on-top " +
+ "popup menu which has whole screen size");
+ }
+ System.out.println("Test passed");
+ }
+
+ private void stopEDT() {
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ frame.dispose();
+ }
+ });
+ }
+}
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JScrollPane/6612531/bug6612531.java Fri May 16 04:37:47 2008 -0700
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6612531
+ * @summary Checks that ScrollPaneLayout.preferredLayoutSize() doesn't throw NPE.
+ * @author Mikhail Lapshin
+ * @run main bug6612531
+ */
+
+import javax.swing.*;
+
+public class bug6612531 {
+ public static void main(String[] args) {
+ ScrollPaneLayout c = new ScrollPaneLayout();
+ JViewport vp = new JViewport();
+ c.addLayoutComponent("VIEWPORT", vp);
+ c.preferredLayoutSize(new JScrollPane());
+ System.out.println("Test passed");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/border/Test6625450.java Fri May 16 04:37:47 2008 -0700
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6625450
+ * @summary Tests the baseline of the titled border
+ * @author Sergey Malenkov
+ */
+
+import java.awt.Component;
+import javax.swing.border.TitledBorder;
+
+public class Test6625450 {
+
+ public static void main(String[] args) {
+ // test height
+ test(false, 0, Integer.MAX_VALUE);
+ test(false, 0, 1);
+ test(true, 0, -1);
+ test(true, 0, Integer.MIN_VALUE);
+ // test width
+ test(false, Integer.MAX_VALUE, 0);
+ test(false, 1, 0);
+ test(true, -1, 0);
+ test(true, Integer.MIN_VALUE, 0);
+ }
+
+ private static final TitledBorder BORDER = new TitledBorder("123");
+ private static final Component COMPONENT = new Component() {
+ };
+
+ private static void test(boolean expected, int width, int height) {
+ try {
+ BORDER.getBaseline(COMPONENT, width, height);
+
+ if (expected) {
+ throw new Error("expected IllegalArgumentException");
+ }
+ }
+ catch (IllegalArgumentException exception) {
+ if (!expected) {
+ throw new Error("unexpected exception", exception);
+ }
+ }
+ }
+}