Skip to content

Commit e707252

Browse files
author
Kannan Goundan
committed
examples/web-file-browser: Fix slurpUtf8Part.
This was calling in.read() twice. The second time it would always be -1, so the function would always return the empty string.
1 parent dd4ab61 commit e707252

File tree

1 file changed

+1
-1
lines changed
  • examples/web-file-browser/src/main/java/com/dropbox/core/examples/web_file_browser

1 file changed

+1
-1
lines changed

examples/web-file-browser/src/main/java/com/dropbox/core/examples/web_file_browser/DropboxBrowse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ private static String slurpUtf8Part(HttpServletRequest request, HttpServletRespo
327327
InputStream in = part.getInputStream();
328328
int bytesRead = in.read(bytes);
329329

330-
if (in.read() == -1) {
330+
if (bytesRead == -1) {
331331
return "";
332332
}
333333

0 commit comments

Comments
 (0)