File tree 2 files changed +2
-5
lines changed
src/main/java/com/thealgorithms/datastructures/crdt
2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change 222
222
<Match >
223
223
<Bug pattern =" FCBL_FIELD_COULD_BE_LOCAL" />
224
224
</Match >
225
- <Match >
226
- <Bug pattern =" ENMI_EQUALS_ON_ENUM" />
227
- </Match >
228
225
<Match >
229
226
<Bug pattern =" IMC_IMMATURE_CLASS_VAR_NAME" />
230
227
</Match >
Original file line number Diff line number Diff line change @@ -124,14 +124,14 @@ public void merge(LWWElementSet other) {
124
124
* @return True if the first element's timestamp is greater or the bias is ADDS and timestamps are equal.
125
125
*/
126
126
public boolean compareTimestamps (Element e , Element other ) {
127
- if (! e .bias . equals ( other .bias ) ) {
127
+ if (e .bias != other .bias ) {
128
128
throw new IllegalArgumentException ("Invalid bias value" );
129
129
}
130
130
Bias bias = e .bias ;
131
131
int timestampComparison = Integer .compare (e .timestamp , other .timestamp );
132
132
133
133
if (timestampComparison == 0 ) {
134
- return ! bias . equals ( Bias .ADDS ) ;
134
+ return bias != Bias .ADDS ;
135
135
}
136
136
return timestampComparison < 0 ;
137
137
}
You can’t perform that action at this time.
0 commit comments