Skip to content

Commit fc7d9a9

Browse files
committed
Rename AutoRestException to RestException
1 parent a6feaf0 commit fc7d9a9

File tree

9 files changed

+20
-20
lines changed

9 files changed

+20
-20
lines changed

azure-android-client-authentication/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ dependencies {
4242
compile fileTree(dir: 'libs', include: ['*.jar'])
4343
compile 'com.android.support:appcompat-v7:23.0.1'
4444
compile 'com.microsoft.aad:adal:1.1.11'
45-
compile 'com.microsoft.rest:client-runtime:1.0.0-beta1'
45+
compile 'com.microsoft.rest:client-runtime:1.0.0-SNAPSHOT'
4646
testCompile 'junit:junit:4.12'
4747
testCompile 'junit:junit-dep:4.11'
4848
deployerJars "org.apache.maven.wagon:wagon-ftp:2.10"

azure-client-authentication/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ checkstyle {
2020

2121
dependencies {
2222
compile 'com.microsoft.azure:adal4j:1.1.2'
23-
compile 'com.microsoft.rest:client-runtime:1.0.0-beta1'
23+
compile 'com.microsoft.rest:client-runtime:1.0.0-SNAPSHOT'
2424
testCompile 'junit:junit:4.12'
2525
testCompile 'junit:junit-dep:4.11'
2626
deployerJars "org.apache.maven.wagon:wagon-ftp:2.10"

azure-client-runtime/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ checkstyle {
2020
}
2121

2222
dependencies {
23-
compile 'com.microsoft.rest:client-runtime:1.0.0-beta1'
23+
compile 'com.microsoft.rest:client-runtime:1.0.0-SNAPSHOT'
2424
testCompile 'junit:junit:4.12'
2525
testCompile 'junit:junit-dep:4.11'
2626
deployerJars "org.apache.maven.wagon:wagon-ftp:2.10"

azure-client-runtime/src/main/java/com/microsoft/azure/AzureServiceResponseBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
package com.microsoft.azure;
99

1010
import com.google.common.reflect.TypeToken;
11-
import com.microsoft.rest.AutoRestException;
11+
import com.microsoft.rest.RestException;
1212
import com.microsoft.rest.ServiceResponse;
1313
import com.microsoft.rest.ServiceResponseBuilder;
1414
import com.microsoft.rest.serializer.JacksonMapperAdapter;
@@ -27,7 +27,7 @@
2727
* @param <T> the return type from caller.
2828
* @param <E> the exception to throw in case of error.
2929
*/
30-
public class AzureServiceResponseBuilder<T, E extends AutoRestException> extends ServiceResponseBuilder<T, E> {
30+
public class AzureServiceResponseBuilder<T, E extends RestException> extends ServiceResponseBuilder<T, E> {
3131
/**
3232
* Create a ServiceResponseBuilder instance.
3333
*

azure-client-runtime/src/main/java/com/microsoft/azure/CloudException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
package com.microsoft.azure;
99

10-
import com.microsoft.rest.AutoRestException;
10+
import com.microsoft.rest.RestException;
1111
import retrofit2.Response;
1212

1313
/**
1414
* Exception thrown for an invalid response with custom error information.
1515
*/
16-
public class CloudException extends AutoRestException {
16+
public class CloudException extends RestException {
1717
/**
1818
* Information about the associated HTTP response.
1919
*/

azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
package com.microsoft.azure;
99

10-
import com.microsoft.rest.AutoRestException;
10+
import com.microsoft.rest.RestException;
1111

1212
import java.io.IOException;
1313
import java.util.Collection;
@@ -46,10 +46,10 @@ public PagedList(Page<E> page) {
4646
*
4747
* @param nextPageLink the link to get the next page of items.
4848
* @return the {@link Page} object storing a page of items and a link to the next page.
49-
* @throws AutoRestException thrown if an error is raised from Azure.
49+
* @throws RestException thrown if an error is raised from Azure.
5050
* @throws IOException thrown if there's any failure in deserialization.
5151
*/
52-
public abstract Page<E> nextPage(String nextPageLink) throws AutoRestException, IOException;
52+
public abstract Page<E> nextPage(String nextPageLink) throws RestException, IOException;
5353

5454
/**
5555
* If there are more pages available.
@@ -69,7 +69,7 @@ public void loadNextPage() {
6969
Page<E> nextPage = nextPage(this.nextPageLink);
7070
this.nextPageLink = nextPage.getNextPageLink();
7171
this.items.addAll(nextPage.getItems());
72-
} catch (AutoRestException e) {
72+
} catch (RestException e) {
7373
throw new WebServiceException(e.toString(), e);
7474
} catch (IOException e) {
7575
throw new DataBindingException(e.getMessage(), e);

client-runtime/src/main/java/com/microsoft/rest/AutoRestException.java renamed to client-runtime/src/main/java/com/microsoft/rest/RestException.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@
1010
/**
1111
* Exception thrown for an invalid response with custom error information.
1212
*/
13-
public abstract class AutoRestException extends Exception {
13+
public abstract class RestException extends Exception {
1414
/**
1515
* Initializes a new instance of the AutoRestException class.
1616
*/
17-
public AutoRestException() { }
17+
public RestException() { }
1818

1919
/**
2020
* Initializes a new instance of the AutoRestException class.
2121
*
2222
* @param message The exception message.
2323
*/
24-
public AutoRestException(String message) {
24+
public RestException(String message) {
2525
super(message);
2626
}
2727

@@ -30,7 +30,7 @@ public AutoRestException(String message) {
3030
*
3131
* @param cause exception that caused this exception to occur
3232
*/
33-
public AutoRestException(Throwable cause) {
33+
public RestException(Throwable cause) {
3434
super(cause);
3535
}
3636

@@ -40,7 +40,7 @@ public AutoRestException(Throwable cause) {
4040
* @param message the exception message
4141
* @param cause exception that caused this exception to occur
4242
*/
43-
public AutoRestException(String message, Throwable cause) {
43+
public RestException(String message, Throwable cause) {
4444
super(message, cause);
4545
}
4646
}

client-runtime/src/main/java/com/microsoft/rest/ServiceException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/**
1313
* Exception thrown for an invalid response with custom error information.
1414
*/
15-
public class ServiceException extends AutoRestException {
15+
public class ServiceException extends RestException {
1616
/**
1717
* Information about the associated HTTP response.
1818
*/

client-runtime/src/main/java/com/microsoft/rest/ServiceResponseBuilder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* @param <T> The return type the caller expects from the REST response.
2828
* @param <E> the exception to throw in case of error.
2929
*/
30-
public class ServiceResponseBuilder<T, E extends AutoRestException> {
30+
public class ServiceResponseBuilder<T, E extends RestException> {
3131
/**
3232
* A mapping of HTTP status codes and their corresponding return types.
3333
*/
@@ -36,7 +36,7 @@ public class ServiceResponseBuilder<T, E extends AutoRestException> {
3636
/**
3737
* The exception type to thrown in case of error.
3838
*/
39-
protected Class<? extends AutoRestException> exceptionType;
39+
protected Class<? extends RestException> exceptionType;
4040

4141
/**
4242
* The mapperAdapter used for deserializing the response.
@@ -83,7 +83,7 @@ public ServiceResponseBuilder<T, E> register(int statusCode, final Type type) {
8383
* @param type the type to deserialize.
8484
* @return the same builder instance.
8585
*/
86-
public ServiceResponseBuilder<T, E> registerError(final Class<? extends AutoRestException> type) {
86+
public ServiceResponseBuilder<T, E> registerError(final Class<? extends RestException> type) {
8787
this.exceptionType = type;
8888
try {
8989
Field f = type.getDeclaredField("body");

0 commit comments

Comments
 (0)