public CodeSourceFacade(final CodeSource codeSource){
  this.location=codeSource.getLocation();
  final Certificate[] certificates=codeSource.getCertificates();
  if (null == certificates || 0 == certificates.length) {
    LOGGER.warning(String.format("no certificate found for %s",codeSource));
    this.firstCertificate=null;
    return;
  }
  this.firstCertificate=(X509Certificate)certificates[0];
}

public CodeSourceFacade ( final CodeSource codeSource ) { this . location = codeSource . getLocation ( ) ; final Certificate [ ] certificates = codeSource . getCertificates ( ) ; if ( null == certificates || 0 == certificates . length ) { LOGGER . warning ( String . format ( "no certificate found for %s" , codeSource ) ) ; this . firstCertificate = null ; return ; } this . firstCertificate = ( X509Certificate ) certificates [ 0 ] ; }
creates a new code source .
