<html>
<body>
At 08:47 AM 1/25/2013, Vincent Ryan wrote:<br>
<blockquote type=cite class=cite cite="">Please review this fix to
correct a failing PKCS12 test:<br><br>
Webrev:
<a href="http://cr.openjdk.java.net/~vinnie/8006946/webrev.00/">
http://cr.openjdk.java.net/~vinnie/8006946/webrev.00/</a><br><br>
Thanks. </blockquote><br>
This first is not a comment on the change - but a "why can't java do
...." type of comment....<br><br>
<br>
<blockquote type=cite class=cite cite=""><pre>
+                
// skip friendlyName, localKeyId and trustedKeyUsage
+                
if (CORE_ATTRIBUTES[0].equals(attributeName) ||
+                    
CORE_ATTRIBUTES[1].equals(attributeName) ||
+                    
CORE_ATTRIBUTES[2].equals(attributeName)) {
+                    
continue;
+                
}
                
</pre><font face="Courier New, Courier"></blockquote><br><br>
We allow arrays to be implicitly treated as collections only in the for
() construct.  For the above, it would be really nice if you could
just do:<br><br>
if (CORE_ATTRIBUTES.contains(attributeName)) {}<br><br>
<br>
For your version, it would be increase supportability if instead
of:<br><br>
<br>
</font><blockquote type=cite class=cite cite=""><pre>
+     private static final String[] CORE_ATTRIBUTES =
{
+        
"1.2.840.113549.1.9.20",
+        
"1.2.840.113549.1.9.21",
+        
"2.16.840.1.113894.746875.1.1"
+     };
+ </pre><font face="Courier New, Courier"></blockquote><br><br>
you did<br><br>
private static final String idAtPkcs9FriendlyName =
"1.2.840.113549.1.9.20";<br><br>
etc... and did "idAtPkcs9FriendlyName.equals(attributeName)"
<br><br>
I can't see any reason why this is in an array as it's not referenced
anywhere else in the code.<br><br>
Mike<br><br>
</font></body>
<br>
</html>