if ( (ca != null) && (Float.compare(oldversion, ca.getVersion()) != 0) ) {
if ( ((ca != null) && (Float.compare(oldversion, ca.getVersion()) != 0)) || upgradedExtendedService) {
    public CA getCA() throws java.io.UnsupportedEncodingException, IllegalKeyStoreException {        CA ca = null;        // First check if we already have a cached instance of the CA        ca = CACacheManager.instance().getCA(getCaId().intValue(), this);        if (ca == null) {            java.beans.XMLDecoder decoder = new  java.beans.XMLDecoder(new java.io.ByteArrayInputStream(getData().getBytes("UTF8")));            HashMap h = (HashMap) decoder.readObject();            decoder.close();            // Handle Base64 encoded string values            HashMap data = new Base64GetHashMap(h);                        // If CA-data is upgraded we want to save the new data, so we must get the old version before loading the data             // and perhaps upgrading            float oldversion = ((Float) data.get(UpgradeableDataHashMap.VERSION)).floatValue();            switch(((Integer)(data.get(CA.CATYPE))).intValue()){                case CAInfo.CATYPE_X509:                    ca = new X509CA(data, getCaId().intValue(), getSubjectDN(), getName(), getStatus());                    break;            }            // Compare old version with current version and save the data if there has been a change            if ( (ca != null) && (Float.compare(oldversion, ca.getVersion()) != 0) ) {            	// Make sure we upgrade the CAToken as well, if needed                ca.getCAToken();                setCA(ca);            }            // We have to do the same if CAToken was upgraded            // Add CA to the cache            CACacheManager.instance().addCA(getCaId().intValue(), ca);        }        return ca;                  }