Skip to content

Commit

Permalink
Make method parameters final in JsonRpcErrorCodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Malaydewangan09 committed Oct 11, 2024
1 parent abfaed5 commit 4b8711e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public enum JsonRpcErrorCodes {
private final int errorCode;
private final String description;

JsonRpcErrorCodes(int errorCode, String description) {
JsonRpcErrorCodes(final int errorCode, final String description) {
this.errorCode = errorCode;
this.description = description;
}
Expand All @@ -37,11 +37,11 @@ public String getDescription() {
return description;
}

public static String getErrorMessage(int errorCode) {
public static String getErrorMessage(final int errorCode) {
return fromCode(errorCode).getDescription();
}

public static JsonRpcErrorCodes fromCode(int errorCode) {
public static JsonRpcErrorCodes fromCode(final int errorCode) {
for (JsonRpcErrorCodes error : values()) {
if (error.getErrorCode() == errorCode) {
return error;
Expand Down

0 comments on commit 4b8711e

Please sign in to comment.