review request for 7008728: diamond conversion of basic security, permission, authentication code

Sean Mullan sean.mullan at oracle.com
Mon Dec 27 12:15:33 PST 2010


On 12/22/10 8:39 PM, Stuart Marks wrote:
> The third batch of diamond conversions in the security area. This one's for
> Sean. Can you review this? Webrev is here:
>
> http://cr.openjdk.java.net/~smarks/reviews/7008728/webrev.0/

src/share/classes/com/sun/security/auth/SubjectCodeSource.java

   [96] Looks like the converter also missed another one. I think this line 
should be:

        new LinkedList<>() :

> In particular, take a look at
>
> src/share/classes/javax/security/auth/Subject.java
>
> It looks like the converter might have missed a diamond opportunity at line 157.
> Hmmm. Let me know what you think.

Yes, I agree.

Everything else looks good, though I did not scan every source file looking for 
potential missed conversions - I only looked for missed ones if it was near the 
code that had differences (such as SubjectCodeSource).

Also, I would be curious to know if there has been any discussion in Project 
Coin regarding my other comment as to whether the diamond operator improves code 
readability if the variable is declared elsewhere.

--Sean




More information about the security-dev mailing list