In compareCerts(), you should not compare Certificate.toString(), its equals() method is more reliable. There is no need to define compareKeys() and compareCerts(). Instead, you should try not to repeat lines 223-231 on 252-260.
The two calls on lines 204 and 205 have keystore names exchanged but keypass order is the same. Also, with two calls it means the comparisons of keys and certs are duplicated. The else block on line 206 looks strange. Do you mean the size is always 1 here? If so, check it. Otherwise, there is no guarantee the aliases appear in the same order. I would be glad to see a generalized comparison method no matter what the keystore size is. Minor issues: It will be clear if you divide the constant strings at the beginning into 2 parts, one for provider names, and one for algorithms. Line 143 and 145, there should be spaces around the testCase name. --Max On Sep 19, 2014, at 11:04, zaiyao liu <zaiyao....@oracle.com> wrote: > Hi Max, > > Can you help to review it? > > Thanks > > Kevin > δΊ 2014/9/1 13:25, Wang Weijun ει: >> On vacation now. Can you look for someone else? I will be back in Sep 17 if >> you are not in a hurry. >> >> --Max >> >> On Sep 1, 2014, at 9:37, zaiyao liu <zaiyao....@oracle.com> wrote: >> >>> Hi Max, >>> >>> Please review the code change,the purpose of this fix is implement tests >>> that convert PKCS12 keystores to other formats. >>> >>> Webrev: http://cr.openjdk.java.net/~tyan/kevin/JDK-8048619/webrev01/ >>> Bug: https://bugs.openjdk.java.net/browse/JDK-8048619 >>> >>> Thanks >>> >>> Kevin >