review of 7117249: java.util warnings patches from LJC/Mike Barker

Alan Bateman Alan.Bateman at
Mon Dec 5 11:48:51 UTC 2011

On 04/12/2011 08:56, Michael Barker wrote:
> Hi,
>> scan of the webrev. There are still a couple of raw type warnings in JarFile
>> and several more in other classes in these packages so it's possible you
>> don't have everything (I wasn't following that thread closely on jdk8-dev).
> Question on a rawtypes fix.  In one case there is method defined as:
> public List<?>  getManifestDigests() {
>      if (jv != null) {
>          return jv.getManifestDigests();
>      }
>      return new ArrayList();
> }
> There is a rawtypes warning on the "new ArrayList()".  I can put a
> specific type as the return value should match
> "jv.getManifestDigests()", which is public so shouldn't be changed.  I
> can define it as "new ArrayList<Object>()" or add
> "@SuppressWarnings("rawtypes") // Need raw type to match public
> signature definition".  Which would be the preferred approach?
> Mike.
I suspect you just need to pull the latest changes because as part of 
7116722 [1], Chris has fixed JarVerifier's getManifestDigests to return 
List<Object>. This should mean that JarFile.getManfiestDigest can be 
changed to:

     List<Object> getManifestDigests() {
         if (jv != null) {
             return jv.getManifestDigests();
         return new ArrayList<Object>();



More information about the core-libs-dev mailing list