@@ -103,23 +103,21 @@ public LargeFileUploadTask(@Nullable final RequestAdapter requestAdapter,
103103 /**
104104 * Perform the upload task.
105105 * @return An UploadResult model containing the information from the server resulting from the upload request.
106- * @throws InterruptedException can be thrown when updateSessionStatus() or uploadSliceAsync() is invoked.
107106 * May also occur if interruption occurs in .sleep() call.
108107 */
109108 @ Nonnull
110- public UploadResult <T > upload () throws InterruptedException {
109+ public UploadResult <T > upload () {
111110 return this .upload (3 , null );
112111 }
113112 /**
114113 * Perform the upload task.
115114 * @param maxTries Number of times to retry the task before giving up.
116115 * @param progress IProgress interface describing how to report progress.
117116 * @return An UploadResult model containing the information from the server resulting from the upload request.
118- * @throws InterruptedException can be thrown when updateSessionStatus() or uploadSliceAsync() is invoked.
119117 * May also occur if interruption occurs in .sleep() call.
120118 */
121119 @ Nonnull
122- public UploadResult <T > upload (int maxTries , @ Nullable IProgressCallback progress ) throws InterruptedException {
120+ public UploadResult <T > upload (int maxTries , @ Nullable IProgressCallback progress ) {
123121 int uploadTries = 0 ;
124122 ArrayList <Throwable > exceptionsList = new ArrayList <>();
125123 while (uploadTries < maxTries ) {
@@ -151,21 +149,19 @@ public UploadResult<T> upload(int maxTries, @Nullable IProgressCallback progress
151149 /**
152150 * Resume the upload task.
153151 * @return An UploadResult model containing the information from the server resulting from the upload request.
154- @throws InterruptedException can be thrown when updateSessionStatus() or uploadAsync() is invoked.
155152 */
156153 @ Nonnull
157- public UploadResult <T > resume () throws InterruptedException {
154+ public UploadResult <T > resume () {
158155 return this .resume (3 , null );
159156 }
160157 /**
161158 * Resume the upload task.
162159 * @param maxTries Number of times to retry the task before giving up.
163160 * @param progress IProgress interface describing how to report progress.
164161 * @return An UploadResult model containing the information from the server resulting from the upload request.
165- * @throws InterruptedException can be thrown when updateSessionStatus() or uploadAsync() is invoked.
166162 */
167163 @ Nonnull
168- public UploadResult <T > resume (int maxTries , @ Nullable IProgressCallback progress ) throws InterruptedException {
164+ public UploadResult <T > resume (int maxTries , @ Nullable IProgressCallback progress ) {
169165 IUploadSession session ;
170166 session = updateSessionStatus ();
171167 OffsetDateTime expirationDateTime = Objects .isNull (session .getExpirationDateTime ()) ? OffsetDateTime .now () : session .getExpirationDateTime ();
@@ -199,7 +195,7 @@ public IUploadSession updateSessionStatus() {
199195 return session ;
200196 }
201197 private boolean firstAttempt ;
202- private UploadResult <T > uploadSlice (UploadSliceRequestBuilder <T > uploadSliceRequestBuilder , ArrayList <Throwable > exceptionsList ) throws IOException , ServiceException , ExecutionException , InterruptedException {
198+ private UploadResult <T > uploadSlice (UploadSliceRequestBuilder <T > uploadSliceRequestBuilder , ArrayList <Throwable > exceptionsList ) throws IOException , ServiceException {
203199 this .firstAttempt = true ;
204200 byte [] buffer = chunkInputStream (uploadStream ,(int ) uploadSliceRequestBuilder .getRangeBegin (), (int )uploadSliceRequestBuilder .getRangeLength ());
205201 ByteArrayInputStream chunkStream = new ByteArrayInputStream (buffer );
0 commit comments