8047027: Fix raw and unchecked lint warnings in generated beaninfo files
authordarcy
Mon, 14 Jul 2014 09:16:00 -0700
changeset 25776 654b0255bbae
parent 25775 6a6fd62bc6d5
child 25777 bb88947b6766
8047027: Fix raw and unchecked lint warnings in generated beaninfo files Reviewed-by: alanb, serb
jdk/make/data/swingbeaninfo/SwingBeanInfo.template
jdk/make/data/swingbeaninfo/javax/swing/SwingBeanInfoBase.java
jdk/make/data/swingbeaninfo/sun/swing/BeanInfoUtils.java
--- a/jdk/make/data/swingbeaninfo/SwingBeanInfo.template	Mon Jul 14 18:44:50 2014 +0400
+++ b/jdk/make/data/swingbeaninfo/SwingBeanInfo.template	Mon Jul 14 09:16:00 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. 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
@@ -42,7 +42,7 @@
  */
 
 public class @(BeanClassName)BeanInfo extends javax.swing.SwingBeanInfoBase {
-    private static final Class class@(BeanClassName) = @(BeanClassObject);
+    private static final Class<?> class@(BeanClassName) = @(BeanClassObject);
 
     /**
      * @return a @(BeanClassName) BeanDescriptor
--- a/jdk/make/data/swingbeaninfo/javax/swing/SwingBeanInfoBase.java	Mon Jul 14 18:44:50 2014 +0400
+++ b/jdk/make/data/swingbeaninfo/javax/swing/SwingBeanInfoBase.java	Mon Jul 14 09:16:00 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -67,7 +67,7 @@
      * its PropertyDescriptors will be included.
      */
     public BeanInfo[] getAdditionalBeanInfo() {
-        Class superClass = getBeanDescriptor().getBeanClass().getSuperclass();
+        Class<?> superClass = getBeanDescriptor().getBeanClass().getSuperclass();
         BeanInfo superBeanInfo = null;
         try {
             superBeanInfo = Introspector.getBeanInfo(superClass);
--- a/jdk/make/data/swingbeaninfo/sun/swing/BeanInfoUtils.java	Mon Jul 14 18:44:50 2014 +0400
+++ b/jdk/make/data/swingbeaninfo/sun/swing/BeanInfoUtils.java	Mon Jul 14 09:16:00 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. 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
@@ -122,7 +122,7 @@
      * @see java.beans#PropertyDescriptor
      * @see java.beans#FeatureDescriptor
      */
-    public static PropertyDescriptor createPropertyDescriptor(Class cls, String name, Object[] args)
+    public static PropertyDescriptor createPropertyDescriptor(Class<?> cls, String name, Object[] args)
     {
         PropertyDescriptor pd = null;
         try {
@@ -156,7 +156,7 @@
                 String methodName = (String)value;
                 Method method;
                 try {
-                    method = cls.getMethod(methodName, new Class[0]);
+                    method = cls.getMethod(methodName, new Class<?>[0]);
                     pd.setReadMethod(method);
                 }
                 catch(Exception e) {
@@ -168,8 +168,8 @@
                 String methodName = (String)value;
                 Method method;
                 try {
-                    Class type = pd.getPropertyType();
-                    method = cls.getMethod(methodName, new Class[]{type});
+                    Class<?> type = pd.getPropertyType();
+                    method = cls.getMethod(methodName, new Class<?>[]{type});
                     pd.setWriteMethod(method);
                 }
                 catch(Exception e) {
@@ -215,9 +215,9 @@
      * @see java.beans#BeanInfo
      * @see java.beans#PropertyDescriptor
      */
-    public static BeanDescriptor createBeanDescriptor(Class cls, Object[] args)
+    public static BeanDescriptor createBeanDescriptor(Class<?> cls, Object[] args)
     {
-        Class customizerClass = null;
+        Class<?> customizerClass = null;
 
         /* For reasons I don't understand, customizerClass is a
          * readOnly property.  So we have to find it and pass it
@@ -242,11 +242,11 @@
     }
 
     static private PropertyDescriptor createReadOnlyPropertyDescriptor(
-        String name, Class cls) throws IntrospectionException {
+        String name, Class<?> cls) throws IntrospectionException {
 
         Method readMethod = null;
         String base = capitalize(name);
-        Class[] parameters = new Class[0];
+        Class<?>[] parameters = new Class<?>[0];
 
         // Is it a boolean?
         try {
@@ -264,7 +264,7 @@
 
         try {
             // Try indexed accessor pattern.
-            parameters = new Class[1];
+            parameters = new Class<?>[1];
             parameters[0] = int.class;
             readMethod = cls.getMethod("get" + base, parameters);
         } catch (NoSuchMethodException nsme) {