Boris Kuznetsov wrote: > So, we should always follow RI? > Even when RI behavior is not consistent and contradicts the spec.?
I never think it's a case of "always". I think it's a case of "always discuss" :) geir > > Here is one example: > > javax.crypto.EncryptedPrivateKeyInfo(algName, encryptedData) spec. states: > "NoSuchAlgorithmException - if the specified algName is not supported." > > For code: > new EncryptedPrivateKeyInfo(":/. ",new byte[598]; > RI output is > java.security.NoSuchAlgorithmException: unrecognized algorithm name: 0 > at sun.security.x509.AlgorithmId.get(AlgorithmId.java:105) > at > javax.crypto.EncryptedPrivateKeyInfo.<init>(Ljava.lang.String;[B)V(Da > shoA12275:???) > > But the following code produses NumberFormatException on RI > new EncryptedPrivateKeyInfo(":/. ",new byte[598]; > > RI output: > java.lang.NumberFormatException: For input string: ":/" > at > java.lang.NumberFormatException.forInputString(NumberFormatException. > java:48) > at java.lang.Integer.parseInt(Integer.java:447) > at java.lang.Integer.valueOf(Integer.java:553) > at > sun.security.util.ObjectIdentifier.<init>(ObjectIdentifier.java:69) > at sun.security.x509.AlgorithmId.algOID(AlgorithmId.java:312) > at sun.security.x509.AlgorithmId.get(AlgorithmId.java:98) > at > javax.crypto.EncryptedPrivateKeyInfo.<init>(Ljava.lang.String;[B)V(Da > shoA12275:???) > > On 7/3/06, Geir Magnusson Jr <[EMAIL PROTECTED]> wrote: >> I think that the details should be considered in this, but I'd rather us >> follow the RI (and log it as a difference from the spec) if we have >> some inkling that user code will be affected by it. >> >> geir >> >> >> Mikhail Loenko wrote: >> > Do I undersyand correctly that even when spec says e.g. >> > that Exception1 is thrown when parameter1 == 10 and RI >> > throws Exception2 then we follow RI ? >> > >> > Thanks, >> > Mikhail >> > >> > --------------------------------------------------------------------- >> > Terms of use : http://incubator.apache.org/harmony/mailing.html >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> > >> >> --------------------------------------------------------------------- >> Terms of use : http://incubator.apache.org/harmony/mailing.html >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]