From Alan.Bateman at oracle.com Thu Dec 1 07:51:04 2011 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Thu, 01 Dec 2011 15:51:04 +0000 Subject: 7116954: Misc warnings in java.beans/java.beans.context In-Reply-To: <4ED79844.9050707@oracle.com> References: <4ED79844.9050707@oracle.com> Message-ID: <4ED7A268.2040805@oracle.com> On 01/12/2011 15:07, Maurizio Cimadamore wrote: > Hi, > I tried to cleanup as many warnings as possible in > java.beans/java.beans.context [1]. There were a few places (esp. in > java.beans.context) in which I had to suppress rawtypes warnings as > the raw types were in method signatures of what looked like public > API. Feedback welcome. > > [1] - http://cr.openjdk.java.net/~mcimadamore/7116954.0/ > > > Maurizio I don't know this area but I skimmed through the changes and don't see anything obviously wrong. The @SuppressWarnings("rawtypes") on java.beans.beancontext.BeanContext is a bit of a shock but as you say, this is the API. Can the scope of the suppressed unchecked in Introspector.getBeanInfo be reduced by using a temporary variable? -Alan From Alan.Bateman at oracle.com Thu Dec 1 09:04:49 2011 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Thu, 01 Dec 2011 17:04:49 +0000 Subject: 7116954: Misc warnings in java.beans/java.beans.context In-Reply-To: <4ED7AC43.7040501@oracle.com> References: <4ED79844.9050707@oracle.com> <4ED7A536.4070804@oracle.com> <4ED7AC43.7040501@oracle.com> Message-ID: <4ED7B3B1.3010909@oracle.com> On 01/12/2011 16:33, Maurizio Cimadamore wrote: > Updated version [1]. > > Changes: > > *) Beans.java:184 - generified PrivilegedAction > *) Beans.java:284 - generified PrivilegedAction > *) NameGenerator.java:108 - changed Object to Integer and removed > following cast > *) Introspector.java: added new fake local variable to reduce scope of > @SuppressWarnings > > [1] - http://cr.openjdk.java.net/~mcimadamore/7116954.1/ > These changes look fine to me. Now the question is where to push this, jdk8/tl or jdk8/awt? My guess is that the beans activity these days is very low these days so if jdk8/awt doesn't see it for weeks then it wouldn't matter. Hopefully Sergey Malenkov will chime. -Alan From Andrey.Pikalev at oracle.com Thu Dec 1 09:13:28 2011 From: Andrey.Pikalev at oracle.com (Andrey Pikalev) Date: Thu, 01 Dec 2011 21:13:28 +0400 Subject: 7116954: Misc warnings in java.beans/java.beans.context In-Reply-To: <4ED7B3B1.3010909@oracle.com> References: <4ED79844.9050707@oracle.com> <4ED7A536.4070804@oracle.com> <4ED7AC43.7040501@oracle.com> <4ED7B3B1.3010909@oracle.com> Message-ID: <4ED7B5B8.6000008@oracle.com> Typically JavaBeans changes went into Swing (now AWT) gate. I don't think this really matter where to push this time assuming the changes will be propagated to AWT repo in a few weeks. Thanks, Andrey. On 12/1/2011 9:04 PM, Alan Bateman wrote: > On 01/12/2011 16:33, Maurizio Cimadamore wrote: >> Updated version [1]. >> >> Changes: >> >> *) Beans.java:184 - generified PrivilegedAction >> *) Beans.java:284 - generified PrivilegedAction >> *) NameGenerator.java:108 - changed Object to Integer and removed >> following cast >> *) Introspector.java: added new fake local variable to reduce scope of >> @SuppressWarnings >> >> [1] - http://cr.openjdk.java.net/~mcimadamore/7116954.1/ >> > These changes look fine to me. > > Now the question is where to push this, jdk8/tl or jdk8/awt? My guess is > that the beans activity these days is very low these days so if jdk8/awt > doesn't see it for weeks then it wouldn't matter. Hopefully Sergey > Malenkov will chime. > > -Alan