mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
Fix LogDTO.compareTo to avoid overflow and contract violation (#5304)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
+1
-1
@@ -45,6 +45,6 @@ public class LogDTO implements Comparable<LogDTO> {
|
||||
|
||||
@Override
|
||||
public int compareTo(LogDTO o) {
|
||||
return (int) (sequence - o.sequence);
|
||||
return Long.compare(sequence, o.sequence);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user