Skip to content

Commit f444876

Browse files
committed
Satisfy lint for devdock example
1 parent bd7aaa1 commit f444876

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

example/src/main/java/io/tus/java/example/Api2DevdockTusUpload.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
import java.util.Map;
1919

2020
public final class Api2DevdockTusUpload {
21+
/**
22+
* Run the API2 devdock TUS upload example.
23+
*
24+
* @param args ignored
25+
*/
2126
public static void main(String[] args) {
2227
try {
2328
System.setProperty("http.strictPostRedirect", "true");
@@ -68,9 +73,10 @@ private static String uploadWithTus(
6873

6974
final TusUploader uploader = client.resumeOrCreateUpload(upload);
7075
uploader.setChunkSize(content.length);
71-
while (uploader.uploadChunk() > -1) {
72-
// Continue until the client reports that the source is fully uploaded.
73-
}
76+
int uploadedChunkSize;
77+
do {
78+
uploadedChunkSize = uploader.uploadChunk();
79+
} while (uploadedChunkSize > -1);
7480
uploader.finish();
7581

7682
if (uploader.getOffset() != content.length) {

0 commit comments

Comments
 (0)