112r1"); // Noncompliant
        keyPairGenerator.initialize(ellipticCurveName);

    } catch (e: NoSuchAlgorithmException) {
        // ...
    } catch (e: InvalidAlgorithmParameterException) {
        // ...
    }
}
</pre>
<h4>Compliant solution</h4>
<pre data-diff-id="1" data-diff-type="compliant">
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;

fun main(args: Array&lt;String&gt;) {
    try {
        val keyPairGenerator = KeyPairGenerator.getInstance("RSA");
      