package org.acra.file;

import android.support.annotation.NonNull;

import java.io.File;
import java.util.Comparator;

/**
 * Orders files from oldest to newest based on their last modified date.
 */
final class LastModifiedComparator implements Comparator<File> {
    @Override
    public int compare(@NonNull File lhs, @NonNull File rhs) {
        return (int) (lhs.lastModified() - rhs.lastModified());
    }
}

@@ -347,22 +347,17 @@
     
-return (int) (
+long l = 
 lhs.
@@ -374,10 +374,26 @@
 ed()
- -
+;%0A        long r =
  rhs
@@ -407,16 +407,61 @@
 dified()
+;%0A        return l %3C r ? -1 : (l == r ? 0 : 1
 );%0A    %7D

Change LastModifiedComparator implementation to be identical with Long.compare()