harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Loenko" <mloe...@gmail.com>
Subject [classlib] bug-to-bug compatibility: SecureRandom
Date Mon, 13 Mar 2006 08:13:24 GMT

one more issue for discussion/approval.

class: java.security.SecureRandom
method: public static SecureRandom getInstance(String algorithm)

According to spec, it throws:
NoSuchAlgorithmException - if the RNG algorithm is not available in
the caller's environment.

RI throws NullPointerException if algorithm==null (seems like they don't do
any check)

Harmony currently makes explicit check:
        if (algorithm == null) {
            throw new NullPointerException("Algorithm is null");


Mikhail Loenko
Intel Middleware Products Division

View raw message