United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6862064 : incorrect implementation of PKIXParameters.clone()

Details
Type:
Bug
Submit Date:
2009-07-19
Status:
Resolved
Updated Date:
2010-09-29
Project Name:
JDK
Resolved Date:
2010-02-16
Component:
security-libs
OS:
generic,solaris_10
Sub-Component:
java.security
CPU:
sparc,generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6,6u13
Fixed Versions:

Related Reports
Backport:
Backport:
Duplicate:

Sub Tasks

Description
1. some of the important attributes are not cloned, such as date.
2. The clone operation should look like:
   copy.certStores = new ArrayList<CertStore>(certStores);
   copy.certPathCheckers = ...

    public Object clone() {
        try {
            Object copy = super.clone();
            // Must clone these because addCertStore, et al. modify them
            if (certStores != null) {
                certStores = new ArrayList<CertStore>(certStores);
            }
            if (certPathCheckers != null) {
                certPathCheckers =
                        new ArrayList<PKIXCertPathChecker>(certPathCheckers);
            }
            return copy;
        } catch (CloneNotSupportedException e) {
            /* Cannot happen */
            throw new InternalError(e.toString());
        }
    }

CrlRevocationChecker.java uses the method.

                                    

Comments
EVALUATION

fix as suggested.
                                     
2010-01-20



Hardware and Software, Engineered to Work Together