private void assertExtendSignaturePossible() throws DSSException {
  final SignatureLevel signatureLevel=params.getSignatureLevel();
  if (XAdES_BASELINE_T.equals(signatureLevel) && (xadesSignature.hasLTProfile() || xadesSignature.hasLTAProfile())) {
    final String exceptionMessage="Cannot extend signature. The signedData is already extended with [%s].";
    throw new DSSException(String.format(exceptionMessage,"XAdES LT"));
  }
}

private void assertExtendSignaturePossible ( ) throws DSSException { final SignatureLevel signatureLevel = params . getSignatureLevel ( ) ; if ( XAdES_BASELINE_T . equals ( signatureLevel ) && ( xadesSignature . hasLTProfile ( ) || xadesSignature . hasLTAProfile ( ) ) ) { final String exceptionMessage = "Cannot extend signature. The signedData is already extended with [%s]." ; throw new DSSException ( String . format ( exceptionMessage , "XAdES LT" ) ) ; } }
checks if the extension is possible .
