mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed issue #2129 , Negative seek offset
This commit is contained in:
@@ -28,10 +28,13 @@ public class FileUtils {
|
|||||||
minIndex = 0;
|
minIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
String line;
|
if (readIndex < 0) {
|
||||||
|
readIndex = 0;
|
||||||
|
}
|
||||||
rf.seek(readIndex);
|
rf.seek(readIndex);
|
||||||
int k = 0;
|
int k = 0;
|
||||||
int c = -1;
|
int c = -1;
|
||||||
|
String line = null;
|
||||||
while (readIndex > start) {
|
while (readIndex > start) {
|
||||||
if (k == l) {
|
if (k == l) {
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user