8047027: Fix raw and unchecked lint warnings in generated beaninfo files

Reviewed-by: alanb, serb
This commit is contained in:
Joe Darcy 2014-07-14 09:16:00 -07:00
parent 221247b43a
commit 229ab7b164
3 changed files with 14 additions and 14 deletions

View File

@ -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 @@ import sun.swing.BeanInfoUtils;
*/
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

View File

@ -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 @@ public class SwingBeanInfoBase extends SimpleBeanInfo
* 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);

View File

@ -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 @@ public class BeanInfoUtils
* @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 @@ public class BeanInfoUtils
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 @@ public class BeanInfoUtils
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 @@ public class BeanInfoUtils
* @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 @@ public class BeanInfoUtils
}
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 @@ public class BeanInfoUtils
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) {