Index: src/test/java/javax/crypto/SecretKeyFactoryTest1.java =================================================================== --- src/test/java/javax/crypto/SecretKeyFactoryTest1.java (revision 393778) +++ src/test/java/javax/crypto/SecretKeyFactoryTest1.java (working copy) @@ -391,9 +391,13 @@ } } try { - skF[i].getKeySpec(secKeySpec, - (defaultAlgorithm.equals(defaultAlgorithm2) - ? DESedeKeySpec.class : DESKeySpec.class)); + Class c; + if (defaultAlgorithm.equals(defaultAlgorithm2)) { + c = DESedeKeySpec.class; + } else { + c = DESKeySpec.class; + } + skF[i].getKeySpec(secKeySpec, c); fail("getKeySpec(secKey, Class): InvalidKeySpecException must be thrown"); } catch (InvalidKeySpecException e) { }