Skip to content

Commit ec0042d

Browse files
committed
fix(base): clean misleading messages
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
1 parent fe2ec16 commit ec0042d

11 files changed

Lines changed: 26 additions & 26 deletions

File tree

hiero-enterprise-base/src/main/java/org/hiero/base/AccountClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ default Account createAccount(long initialBalanceInHbar) throws HieroException {
8989
*/
9090
@NonNull
9191
default Hbar getAccountBalance(@NonNull String accountId) throws HieroException {
92-
Objects.requireNonNull(accountId, "newAccountId must not be null");
92+
Objects.requireNonNull(accountId, "accountId must not be null");
9393
return getAccountBalance(AccountId.fromString(accountId));
9494
}
9595

hiero-enterprise-base/src/main/java/org/hiero/base/data/Account.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public record Account(
1717
@NonNull AccountId accountId, @NonNull PublicKey publicKey, @NonNull PrivateKey privateKey) {
1818

1919
public Account {
20-
Objects.requireNonNull(accountId, "newAccountId must not be null");
20+
Objects.requireNonNull(accountId, "accountId must not be null");
2121
Objects.requireNonNull(publicKey, "publicKey must not be null");
2222
Objects.requireNonNull(privateKey, "privateKey must not be null");
2323
}

hiero-enterprise-base/src/main/java/org/hiero/base/implementation/FileClientImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class FileClientImpl implements FileClient {
2929

3030
public FileClientImpl(@NonNull final ProtocolLayerClient protocolLayerClient) {
3131
this.protocolLayerClient =
32-
Objects.requireNonNull(protocolLayerClient, "protocolLevelClient must not be null");
32+
Objects.requireNonNull(protocolLayerClient, "protocolLayerClient must not be null");
3333
}
3434

3535
@Override

hiero-enterprise-base/src/main/java/org/hiero/base/implementation/ProtocolLayerClientImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ public ContractDeleteResult executeContractDeleteTransaction(
294294
public ContractCallResult executeContractCallTransaction(
295295
@NonNull final ContractCallRequest request) throws HieroException {
296296
Objects.requireNonNull(request, "request must not be null");
297-
final ContractFunctionParameters functionParams = createParameters(request.constructorParams());
297+
final ContractFunctionParameters functionParams = createParameters(request.functionParams());
298298
final ContractExecuteTransaction transaction =
299299
new ContractExecuteTransaction()
300300
.setMaxTransactionFee(request.maxTransactionFee())

hiero-enterprise-base/src/main/java/org/hiero/base/implementation/SmartContractClientImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class SmartContractClientImpl implements SmartContractClient {
3232
public SmartContractClientImpl(
3333
@NonNull final ProtocolLayerClient protocolLayerClient, FileClient fileClient) {
3434
this.protocolLayerClient =
35-
Objects.requireNonNull(protocolLayerClient, "protocolLevelClient must not be null");
35+
Objects.requireNonNull(protocolLayerClient, "protocolLayerClient must not be null");
3636
this.fileClient = Objects.requireNonNull(fileClient, "fileClient must not be null");
3737
}
3838

hiero-enterprise-base/src/main/java/org/hiero/base/interceptors/ReceiveRecordInterceptor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public interface ReceiveRecordInterceptor {
2020
/**
2121
* Intercept the call for receiving a record for a transaction.
2222
*
23-
* @param handler the handler that will be used to receive the record
23+
* @param handler the record handler to invoke
2424
* @return the record for the transaction
2525
* @throws Exception if the interceptor fails
2626
*/
@@ -31,7 +31,7 @@ public interface ReceiveRecordInterceptor {
3131
*
3232
* @param transaction the transaction for which the record is received
3333
* @param receipt the receipt for the transaction
34-
* @param function the function that will be used to receive the record
34+
* @param function the callback that fetches the record from the receipt
3535
*/
3636
record ReceiveRecordHandler(
3737
@NonNull Transaction transaction,
@@ -41,7 +41,7 @@ record ReceiveRecordHandler(
4141
public ReceiveRecordHandler {
4242
Objects.requireNonNull(transaction, "transaction must not be null");
4343
Objects.requireNonNull(receipt, "receipt must not be null");
44-
Objects.requireNonNull(function, "handler must not be null");
44+
Objects.requireNonNull(function, "function must not be null");
4545
}
4646

4747
/**

hiero-enterprise-base/src/main/java/org/hiero/base/mirrornode/MirrorNodeClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ default Optional<Nft> queryNftsByTokenIdAndSerial(@NonNull String tokenId, long
142142
default Optional<Nft> queryNftsByAccountAndTokenIdAndSerial(
143143
@NonNull AccountId accountId, @NonNull TokenId tokenId, long serialNumber)
144144
throws HieroException {
145-
Objects.requireNonNull(accountId, "newAccountId must not be null");
145+
Objects.requireNonNull(accountId, "accountId must not be null");
146146
return queryNftsByTokenIdAndSerial(tokenId, serialNumber)
147147
.filter(nft -> Objects.equals(nft.owner(), accountId));
148148
}

hiero-enterprise-base/src/main/java/org/hiero/base/mirrornode/TransactionRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ default Page<TransactionInfo> findByAccountAndType(
8989
default Page<TransactionInfo> findByAccountAndResult(
9090
@NonNull String accountId, @NonNull Result result) throws HieroException {
9191
Objects.requireNonNull(accountId, "accountId must not be null");
92-
Objects.requireNonNull(result, "type must not be null");
92+
Objects.requireNonNull(result, "result must not be null");
9393
return findByAccountAndResult(AccountId.fromString(accountId), result);
9494
}
9595
;

hiero-enterprise-base/src/main/java/org/hiero/base/protocol/data/AccountBalanceRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public record AccountBalanceRequest(
99
@NonNull AccountId accountId, Hbar queryPayment, Hbar maxQueryPayment) implements QueryRequest {
1010

1111
public AccountBalanceRequest {
12-
Objects.requireNonNull(accountId, "newAccountId must not be null");
12+
Objects.requireNonNull(accountId, "accountId must not be null");
1313
}
1414

1515
@NonNull
@@ -19,7 +19,7 @@ public static AccountBalanceRequest of(@NonNull AccountId accountId) {
1919

2020
@NonNull
2121
public static AccountBalanceRequest of(@NonNull String accountId) {
22-
Objects.requireNonNull(accountId, "newAccountId must not be null");
22+
Objects.requireNonNull(accountId, "accountId must not be null");
2323
return of(AccountId.fromString(accountId));
2424
}
2525

hiero-enterprise-base/src/main/java/org/hiero/base/protocol/data/AccountCreateResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public record AccountCreateResult(
2323
Objects.requireNonNull(transactionHash, "transactionHash must not be null");
2424
Objects.requireNonNull(consensusTimestamp, "consensusTimestamp must not be null");
2525
Objects.requireNonNull(transactionFee, "transactionFee must not be null");
26-
Objects.requireNonNull(newAccount, "newAccountId must not be null");
26+
Objects.requireNonNull(newAccount, "newAccount must not be null");
2727
if (transactionFee.toTinybars() < 0) {
2828
throw new IllegalArgumentException("transactionFee must be non-negative");
2929
}

0 commit comments

Comments
 (0)