diff options
author | Patrick Tasse | 2014-05-30 20:54:48 +0000 |
---|---|---|
committer | Patrick Tasse | 2014-06-04 15:17:18 +0000 |
commit | 098b4b38094e618dde5c448115973a79b0c93d78 (patch) | |
tree | 9f2e2f3b7d2ab33e6b27b6abb8aadaf16f628a8a /lttng | |
parent | 7a2d9b57e7474d7dfba3c701b2b31b66c1779340 (diff) | |
download | org.eclipse.linuxtools-098b4b38094e618dde5c448115973a79b0c93d78.tar.gz org.eclipse.linuxtools-098b4b38094e618dde5c448115973a79b0c93d78.tar.xz org.eclipse.linuxtools-098b4b38094e618dde5c448115973a79b0c93d78.zip |
tmf: Bug 436263: BufferedRandomAccessFile read does not return -1 on EOF
Change-Id: I06b056af1249604ec1113035c623a7da3eb90cbd
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/27624
Tested-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
(cherry picked from commit acc60287f48004b0293305627040cdf31431b9fe)
Reviewed-on: https://git.eclipse.org/r/27852
Diffstat (limited to 'lttng')
-rw-r--r-- | lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/io/BufferedRandomAccessFile.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/io/BufferedRandomAccessFile.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/io/BufferedRandomAccessFile.java index 65900a0afb..8c0b9c3ed3 100644 --- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/io/BufferedRandomAccessFile.java +++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/io/BufferedRandomAccessFile.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2013 Ericsson + * Copyright (c) 2010, 2014 Ericsson * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which @@ -140,6 +140,9 @@ public class BufferedRandomAccessFile extends RandomAccessFile { if (c != -1) { b[off + i] = (byte) c; } else { + if (i == 0) { + return -1; + } return i; } } |