Warning Fixes from LJC Hack Session (original) (raw)
Michael Barker mikeb01 at gmail.com
Sat Feb 4 08:40:19 PST 2012
- Previous message: Warning Fixes from LJC Hack Session
- Next message: Warning Fixes from LJC Hack Session
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Patch with BeanSupportContext changes removed.
Mike.
On Sat, Feb 4, 2012 at 3:48 PM, Chris Hegarty <chris.hegarty at oracle.com> wrote:
I think you should just drop the changes to this file.
-Chris. Michael Barker <mikeb01 at gmail.com> wrote:
Oh, good catch Alan, I missed this. This part of the change should be reversed ( at least in the context of warnings cleanup ). Should I switch it to a wild card (protected transient ArrayList<?> bcmListeners) or just drop the modifications for that file? Mike. -------------- next part -------------- diff -r 55a82eba1986 src/share/classes/java/awt/List.java --- a/src/share/classes/java/awt/List.java Wed Feb 01 16:00:39 2012 -0800 +++ b/src/share/classes/java/awt/List.java Sat Feb 04 16:33:27 2012 +0000 @@ -115,7 +115,7 @@ * @see #addItem(String) * @see #getItem(int) */
- Vector items = new Vector();
Vector items = new Vector<>();
/**
- This field will represent the number of visible rows in the
@@ -306,7 +306,7 @@ // to insure that it cannot be overridden by client subclasses. // DO NOT INVOKE CLIENT CODE ON THIS THREAD! final String getItemImpl(int index) {
return (String)items.elementAt(index);
return items.elementAt(index);
}
/**
@@ -415,7 +415,7 @@ if (peer != null) { peer.removeAll(); }
items = new Vector();
}items = new Vector<>(); selected = new int[0];
@@ -490,9 +490,9 @@ public synchronized int[] getSelectedIndexes() { ListPeer peer = (ListPeer)this.peer; if (peer != null) {
selected = ((ListPeer)peer).getSelectedIndexes();
selected = peer.getSelectedIndexes(); }
return (int[])selected.clone();
return selected.clone();
}
/**
@@ -908,7 +908,7 @@ * @since 1.4 */ public synchronized ItemListener[] getItemListeners() {
return (ItemListener[])(getListeners(ItemListener.class));
return getListeners(ItemListener.class);
}
/**
@@ -975,7 +975,7 @@ * @since 1.4 */ public synchronized ActionListener[] getActionListeners() {
return (ActionListener[])(getListeners(ActionListener.class));
return getListeners(ActionListener.class);
}
/**
diff -r 55a82eba1986 src/share/classes/java/awt/Window.java --- a/src/share/classes/java/awt/Window.java Wed Feb 01 16:00:39 2012 -0800 +++ b/src/share/classes/java/awt/Window.java Sat Feb 04 16:33:27 2012 +0000 @@ -398,10 +398,10 @@ initIDs(); }
String s = (String) java.security.AccessController.doPrivileged(
String s = java.security.AccessController.doPrivileged( new GetPropertyAction("java.awt.syncLWRequests")); systemSyncLWRequests = (s != null && s.equals("true"));
s = (String) java.security.AccessController.doPrivileged(
} @@ -1378,7 +1378,7 @@ // make sure the privileged action is only // for getting the property! We don't want the // above checkTopLevelWindow call to always succeed!s = java.security.AccessController.doPrivileged( new GetPropertyAction("java.awt.Window.locationByPlatform")); locationByPlatformProp = (s != null && s.equals("true"));
warningString = (String) AccessController.doPrivileged(
warningString = AccessController.doPrivileged( new GetPropertyAction("awt.appletWarning", "Java Applet Window")); }
diff -r 55a82eba1986 src/share/classes/java/awt/color/ICC_Profile.java --- a/src/share/classes/java/awt/color/ICC_Profile.java Wed Feb 01 16:00:39 2012 -0800 +++ b/src/share/classes/java/awt/color/ICC_Profile.java Sat Feb 04 16:33:27 2012 +0000 @@ -921,9 +921,9 @@ */ private static ICC_Profile getStandardProfile(final String name) {
return (ICC_Profile) AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
return AccessController.doPrivileged(
new PrivilegedAction<ICC_Profile>() {
public ICC_Profile run() { ICC_Profile p = null; try { p = getInstance (name);
diff -r 55a82eba1986 src/share/classes/javax/print/attribute/standard/PrinterStateReasons.java --- a/src/share/classes/javax/print/attribute/standard/PrinterStateReasons.java Wed Feb 01 16:00:39 2012 -0800 +++ b/src/share/classes/javax/print/attribute/standard/PrinterStateReasons.java Sat Feb 04 16:33:27 2012 +0000 @@ -180,8 +180,7 @@ if (severity == null) { throw new NullPointerException("severity is null"); }
return super.put((PrinterStateReason) reason,
(Severity) severity);
return super.put(reason, severity);
}
/**
diff -r 55a82eba1986 src/share/classes/javax/print/attribute/standard/ReferenceUriSchemesSupported.java --- a/src/share/classes/javax/print/attribute/standard/ReferenceUriSchemesSupported.java Wed Feb 01 16:00:39 2012 -0800 +++ b/src/share/classes/javax/print/attribute/standard/ReferenceUriSchemesSupported.java Sat Feb 04 16:33:27 2012 +0000 @@ -141,7 +141,7 @@ * Returns the string table for class ReferenceUriSchemesSupported. */ protected String[] getStringTable() {
return (String[])myStringTable.clone();
return myStringTable.clone();
}
/**
diff -r 55a82eba1986 src/share/classes/sun/beans/infos/ComponentBeanInfo.java --- a/src/share/classes/sun/beans/infos/ComponentBeanInfo.java Wed Feb 01 16:00:39 2012 -0800 +++ b/src/share/classes/sun/beans/infos/ComponentBeanInfo.java Sat Feb 04 16:33:27 2012 +0000 @@ -32,7 +32,7 @@ */
public class ComponentBeanInfo extends SimpleBeanInfo {
- private static final Class beanClass = java.awt.Component.class;
private static final Class<java.awt.Component> beanClass = java.awt.Component.class;
public PropertyDescriptor[] getPropertyDescriptors() { try {
- Previous message: Warning Fixes from LJC Hack Session
- Next message: Warning Fixes from LJC Hack Session
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]