File tree Expand file tree Collapse file tree 2 files changed +2
-29
lines changed
main/java/org/apache/seata/common/result
test/java/org/apache/seata/common/code Expand file tree Collapse file tree 2 files changed +2
-29
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,12 @@ public enum Code {
34
34
/**
35
35
* The Code.
36
36
*/
37
- public String code ;
37
+ public final String code ;
38
38
39
39
/**
40
40
* The Msg.
41
41
*/
42
- public String msg ;
42
+ public final String msg ;
43
43
44
44
private Code (String code , String msg ) {
45
45
this .code = code ;
@@ -55,15 +55,6 @@ public String getCode() {
55
55
return this .code ;
56
56
}
57
57
58
- /**
59
- * Sets code.
60
- *
61
- * @param code the code
62
- */
63
- public void setCode (String code ) {
64
- this .code = code ;
65
- }
66
-
67
58
/**
68
59
* Gets msg.
69
60
*
@@ -73,15 +64,6 @@ public String getMsg() {
73
64
return msg ;
74
65
}
75
66
76
- /**
77
- * Sets msg.
78
- *
79
- * @param msg the msg
80
- */
81
- public void setMsg (String msg ) {
82
- this .msg = msg ;
83
- }
84
-
85
67
/**
86
68
* Gets error msg.
87
69
*
Original file line number Diff line number Diff line change @@ -39,13 +39,4 @@ public void testGetErrorMsgWithInvalidCodeReturnsNull() {
39
39
// Test case for non-existing code
40
40
assertNull (Code .getErrorMsg ("404" ));
41
41
}
42
-
43
- @ Test
44
- public void testSetCodeAndMsgUpdatesValuesCorrectly () {
45
- // Test case to check if setCode and setMsg are working as expected
46
- Code .SUCCESS .setCode ("201" );
47
- Code .SUCCESS .setMsg ("Created" );
48
- assertEquals ("201" , Code .SUCCESS .getCode ());
49
- assertEquals ("Created" , Code .SUCCESS .getMsg ());
50
- }
51
42
}
You can’t perform that action at this time.
0 commit comments