-
Bug
-
Resolution: Fixed
-
P2
-
7
-
b41
-
generic
-
generic
Please see the following code:
--------------------------------------------------------
import java.security.cert.CertPathValidatorException;
public class CPVTest {
public static void main(String[] args) {
Throwable[] causes = {
new Throwable(),
new Throwable("message"),
new Throwable("message", new Throwable()) };
for (Throwable cause: causes) {
CertPathValidatorException cpve =
new CertPathValidatorException(cause);
// from CertPathValidatorException(Throwable cause) spec:
// The detail message is set to (cause==null ? null : cause.toString() )
// (which typically contains the class and detail message of cause).
String message = (cause == null ? null : cause.toString());
System.out.println("expected message:" + message);
System.out.println("getMessage():" + cpve.getMessage());
}
}
}
--------------------------------------------------------
Since b37 it's output is:
--------------------------------------------------------
expected message:java.lang.Throwable
getMessage():null
expected message:java.lang.Throwable: message
getMessage():null
expected message:java.lang.Throwable: message
getMessage():null
--------------------------------------------------------
--------------------------------------------------------
import java.security.cert.CertPathValidatorException;
public class CPVTest {
public static void main(String[] args) {
Throwable[] causes = {
new Throwable(),
new Throwable("message"),
new Throwable("message", new Throwable()) };
for (Throwable cause: causes) {
CertPathValidatorException cpve =
new CertPathValidatorException(cause);
// from CertPathValidatorException(Throwable cause) spec:
// The detail message is set to (cause==null ? null : cause.toString() )
// (which typically contains the class and detail message of cause).
String message = (cause == null ? null : cause.toString());
System.out.println("expected message:" + message);
System.out.println("getMessage():" + cpve.getMessage());
}
}
}
--------------------------------------------------------
Since b37 it's output is:
--------------------------------------------------------
expected message:java.lang.Throwable
getMessage():null
expected message:java.lang.Throwable: message
getMessage():null
expected message:java.lang.Throwable: message
getMessage():null
--------------------------------------------------------
- relates to
-
JDK-6465942 Add problem identification facility to the CertPathValidator framework
-
- Closed
-