src/main/java/com/hedera/hashgraph/identity/hcs/MessageTransaction.java
/**
   * Runs validation logic.
   *
   * @param validator The errors validator.
   */
Runs validation logic.
@param validator The errors validator.
Runs validation logic . @param validator The errors validator .
protected void validate(final Validator validator) {
    validator.require(!executed, "This transaction has already been executed.");
    validator.require(signer != null
                    || privateKey != null
                    || (message != null && !Strings.isNullOrEmpty(message.getSignature())),
            "Signing function is missing.");
    if (this.maxTransactionFee == null) {
      validator.require(buildTransactionFunction != null, "Transaction builder is missing.");
    }
    validator.require((encrypter != null && decrypter != null) || (encrypter == null && decrypter == null),
            "Either both encrypter and decrypter must be specified or none.");
  }
protected void validate ( final Validator validator ) { validator . require ( ! executed , "This transaction has already been executed." ) ; validator . require ( signer != null || privateKey != null || ( message != null && ! Strings . isNullOrEmpty ( message . getSignature ( ) ) ) , "Signing function is missing." ) ; if ( this . maxTransactionFee == null ) { validator . require ( buildTransactionFunction != null , "Transaction builder is missing." ) ; } validator . require ( ( encrypter != null && decrypter != null ) || ( encrypter == null && decrypter == null ) , "Either both encrypter and decrypter must be specified or none." ) ; }
Runs validation logic.
Runs validation logic .
// signing function or signing key is only needed if signed message was not provided.