protected void createGoogleAppsPrivateKey() throws Exception {
        if (!isValidConfiguration()) {
            LOGGER.debug("Google Apps private key bean will not be created, because it's not configured");
            return;
        }

        val bean = new PrivateKeyFactoryBean();

        if (this.privateKeyLocation.startsWith(ResourceUtils.CLASSPATH_URL_PREFIX)) {
            bean.setLocation(new ClassPathResource(StringUtils.removeStart(this.privateKeyLocation, ResourceUtils.CLASSPATH_URL_PREFIX)));
        } else if (this.privateKeyLocation.startsWith(ResourceUtils.FILE_URL_PREFIX)) {
            bean.setLocation(new FileSystemResource(StringUtils.removeStart(this.privateKeyLocation, ResourceUtils.FILE_URL_PREFIX)));
        } else {
            bean.setLocation(new FileSystemResource(this.privateKeyLocation));
        }

        bean.setAlgorithm(this.keyAlgorithm);
        LOGGER.debug("Loading Google Apps private key from [{}] with key algorithm [{}]",
            bean.getLocation(), bean.getAlgorithm());
        bean.afterPropertiesSet();
        LOGGER.debug("Creating Google Apps private key instance via [{}]", this.privateKeyLocation);
        this.privateKey = bean.getObject();
    }
protected void createGoogleAppsPrivateKey ( ) throws Exception { if ( ! isValidConfiguration ( ) ) { LOGGER . debug ( "Google Apps private key bean will not be created, because it's not configured" ) ; return ; } val bean = new PrivateKeyFactoryBean ( ) ; if ( this . privateKeyLocation . startsWith ( ResourceUtils . CLASSPATH_URL_PREFIX ) ) { bean . setLocation ( new ClassPathResource ( StringUtils . removeStart ( this . privateKeyLocation , ResourceUtils . CLASSPATH_URL_PREFIX ) ) ) ; } else if ( this . privateKeyLocation . startsWith ( ResourceUtils . FILE_URL_PREFIX ) ) { bean . setLocation ( new FileSystemResource ( StringUtils . removeStart ( this . privateKeyLocation , ResourceUtils . FILE_URL_PREFIX ) ) ) ; } else { bean . setLocation ( new FileSystemResource ( this . privateKeyLocation ) ) ; } bean . setAlgorithm ( this . keyAlgorithm ) ; LOGGER . debug ( "Loading Google Apps private key from [{}] with key algorithm [{}]" , bean . getLocation ( ) , bean . getAlgorithm ( ) ) ; bean . afterPropertiesSet ( ) ; LOGGER . debug ( "Creating Google Apps private key instance via [{}]" , this . privateKeyLocation ) ; this . privateKey = bean . getObject ( ) ; }
Create the private key.

@throws Exception if key creation ran into an error