-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: fix sonarcloud code smells for injection issues (#142)
* refactor: fix sonarcloud code smells for injection issues * refactor: fix sonarcloud code smells * refactor: spotless fixes * refactor: sonar issues * refactor: implemented comments
- Loading branch information
Showing
10 changed files
with
57 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...ain/java/org/cardanofoundation/rosetta/api/block/model/domain/PoolRegistrationParams.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 33 additions & 1 deletion
34
...va/org/cardanofoundation/rosetta/common/model/cardano/transaction/MemPoolTransaction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,37 @@ | ||
package org.cardanofoundation.rosetta.common.model.cardano.transaction; | ||
|
||
import java.util.Arrays; | ||
import java.util.Objects; | ||
|
||
import org.openapitools.client.model.TransactionIdentifier; | ||
|
||
public record MemPoolTransaction(TransactionIdentifier identifier, byte[] txBytes) {} | ||
public record MemPoolTransaction(TransactionIdentifier identifier, byte[] txBytes) { | ||
|
||
@Override | ||
public boolean equals(Object object) { | ||
if (this == object) { | ||
return true; | ||
} | ||
if (object == null || getClass() != object.getClass()) { | ||
return false; | ||
} | ||
MemPoolTransaction that = (MemPoolTransaction) object; | ||
return Objects.equals(identifier, that.identifier) && Arrays.equals(txBytes, | ||
that.txBytes); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int result = Objects.hash(identifier); | ||
result = 31 * result + Arrays.hashCode(txBytes); | ||
return result; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "MemPoolTransaction{" + | ||
"identifier=" + identifier + | ||
", txBytes=" + Arrays.toString(txBytes) + | ||
'}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters