Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ under the License.
<parent>
<groupId>org.apache.maven</groupId>
<artifactId>maven-parent</artifactId>
<version>45</version>
<version>47</version>
</parent>

<groupId>org.apache.maven.wagon</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,14 @@ protected void finishPutTransfer(Resource resource, InputStream input, OutputStr
int statusCode = putConnection.getResponseCode();

switch (statusCode) {
// Success Codes
// Success Codes
case HttpURLConnection.HTTP_OK: // 200
case HttpURLConnection.HTTP_CREATED: // 201
case HttpURLConnection.HTTP_ACCEPTED: // 202
case HttpURLConnection.HTTP_NO_CONTENT: // 204
break;

// TODO Move 401/407 to AuthenticationException after WAGON-587
// TODO Move 401/407 to AuthenticationException after WAGON-587
case HttpURLConnection.HTTP_FORBIDDEN:
case HttpURLConnection.HTTP_UNAUTHORIZED:
case HttpURLConnection.HTTP_PROXY_AUTH:
Expand All @@ -251,7 +251,7 @@ protected void finishPutTransfer(Resource resource, InputStream input, OutputStr
throw new ResourceDoesNotExistException(formatResourceDoesNotExistMessage(
buildUrl(resource), statusCode, reasonPhrase, getProxyInfo()));

// add more entries here
// add more entries here
default:
throw new TransferFailedException(
formatTransferFailedMessage(buildUrl(resource), statusCode, reasonPhrase, getProxyInfo()));
Expand Down Expand Up @@ -347,7 +347,7 @@ public boolean resourceExists(String resourceName) throws TransferFailedExceptio
case HttpURLConnection.HTTP_GONE:
return false;

// TODO Move 401/407 to AuthenticationException after WAGON-587
// TODO Move 401/407 to AuthenticationException after WAGON-587
case HttpURLConnection.HTTP_FORBIDDEN:
case HttpURLConnection.HTTP_UNAUTHORIZED:
case HttpURLConnection.HTTP_PROXY_AUTH:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -716,14 +716,14 @@ private void put(int wait, Resource resource, File source, HttpEntity httpEntity

// Check that we didn't run out of retries.
switch (statusCode) {
// Success Codes
// Success Codes
case HttpStatus.SC_OK: // 200
case HttpStatus.SC_CREATED: // 201
case HttpStatus.SC_ACCEPTED: // 202
case HttpStatus.SC_NO_CONTENT: // 204
break;

// TODO Move 401/407 to AuthenticationException after WAGON-587
// TODO Move 401/407 to AuthenticationException after WAGON-587
case HttpStatus.SC_FORBIDDEN:
case HttpStatus.SC_UNAUTHORIZED:
case HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
Expand All @@ -748,7 +748,7 @@ private void put(int wait, Resource resource, File source, HttpEntity httpEntity
EntityUtils.consumeQuietly(response.getEntity());
put(backoff(wait, url), resource, source, httpEntity, url);
break;
// add more entries here
// add more entries here
default:
EntityUtils.consumeQuietly(response.getEntity());
TransferFailedException e = new TransferFailedException(formatTransferFailedMessage(
Expand Down Expand Up @@ -798,7 +798,7 @@ private boolean resourceExists(int wait, String resourceName)
result = true;
break;

// TODO Move 401/407 to AuthenticationException after WAGON-587
// TODO Move 401/407 to AuthenticationException after WAGON-587
case HttpStatus.SC_FORBIDDEN:
case HttpStatus.SC_UNAUTHORIZED:
case HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
Expand All @@ -816,7 +816,7 @@ private boolean resourceExists(int wait, String resourceName)
case SC_TOO_MANY_REQUESTS:
return resourceExists(backoff(wait, resourceName), resourceName);

// add more entries here
// add more entries here
default:
throw new TransferFailedException(formatTransferFailedMessage(
url,
Expand Down Expand Up @@ -1047,7 +1047,7 @@ private void fillInputData(int wait, InputData inputData)
// return, leaving last modified set to original value so getIfNewer should return unmodified
return;

// TODO Move 401/407 to AuthenticationException after WAGON-587
// TODO Move 401/407 to AuthenticationException after WAGON-587
case HttpStatus.SC_FORBIDDEN:
case HttpStatus.SC_UNAUTHORIZED:
case HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
Expand All @@ -1073,7 +1073,7 @@ private void fillInputData(int wait, InputData inputData)
fillInputData(backoff(wait, url), inputData);
break;

// add more entries here
// add more entries here
default:
EntityUtils.consumeQuietly(response.getEntity());
cleanupGetTransfer(resource);
Expand Down