Skip to content

Commit faf7508

Browse files
committed
Merge commit '97bc529bbb06017de0bb069012c016c2949157be' into javavnext
2 parents f116efa + 4736d63 commit faf7508

File tree

10 files changed

+393
-42
lines changed

10 files changed

+393
-42
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ android:
99
- extra-android-m2repository
1010
sudo: false
1111
script:
12-
- mvn clean package
12+
- mvn clean install
13+
- mvn checkstyle:check
1314
- cd ./azure-android-client-authentication && ./gradlew check

azure-client-authentication/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ apply plugin: 'checkstyle'
1313
version = '1.0.0-SNAPSHOT'
1414

1515
checkstyle {
16-
configFile = new File("$rootDir/Tools/checkstyle/checkstyle.xml")
17-
configProperties = [samedir: "$rootDir/Tools/checkstyle"]
18-
reportsDir = new File("$rootDir/Tools/checkstyle/reports")
16+
toolVersion = "6.18"
17+
configFile = new File("$rootDir/ClientRuntimes/Java/build-tools/src/main/resources/checkstyle.xml")
18+
configProperties = [samedir: "$rootDir/ClientRuntimes/Java/build-tools/src/main/resources"]
19+
reportsDir = new File("$rootDir/ClientRuntimes/Java/build-tools/reports")
1920
}
2021

2122
dependencies {

azure-client-runtime/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ apply plugin: 'checkstyle'
1313
version = '1.0.0-SNAPSHOT'
1414

1515
checkstyle {
16-
toolVersion = "6.9"
17-
configFile = new File("$rootDir/Tools/checkstyle/checkstyle.xml")
18-
configProperties = [samedir: "$rootDir/Tools/checkstyle"]
19-
reportsDir = new File("$rootDir/Tools/checkstyle/reports")
16+
toolVersion = "6.18"
17+
configFile = new File("$rootDir/ClientRuntimes/Java/build-tools/src/main/resources/checkstyle.xml")
18+
configProperties = [samedir: "$rootDir/ClientRuntimes/Java/build-tools/src/main/resources"]
19+
reportsDir = new File("$rootDir/ClientRuntimes/Java/build-tools/reports")
2020
}
2121

2222
dependencies {

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

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
import com.microsoft.rest.ServiceResponse;
1414
import com.microsoft.rest.ServiceResponseCallback;
1515
import com.microsoft.rest.ServiceResponseWithHeaders;
16+
import okhttp3.ResponseBody;
17+
import retrofit2.Call;
18+
import retrofit2.Response;
19+
import retrofit2.http.GET;
20+
import retrofit2.http.Header;
21+
import retrofit2.http.Url;
1622

1723
import java.io.IOException;
1824
import java.lang.reflect.Type;
@@ -22,13 +28,6 @@
2228
import java.util.concurrent.ScheduledExecutorService;
2329
import java.util.concurrent.TimeUnit;
2430

25-
import okhttp3.ResponseBody;
26-
import retrofit2.Call;
27-
import retrofit2.Response;
28-
import retrofit2.http.GET;
29-
import retrofit2.http.Header;
30-
import retrofit2.http.Url;
31-
3231
/**
3332
* An instance of this class defines a ServiceClient that handles polling and
3433
* retrying for long running operations when accessing Azure resources.
@@ -288,8 +287,7 @@ public <T> ServiceResponse<T> getPostOrDeleteResult(Response<ResponseBody> respo
288287
}
289288

290289
// Check if operation failed
291-
if (AzureAsyncOperation.getFailedStatuses().contains(pollingState.getStatus()))
292-
{
290+
if (AzureAsyncOperation.getFailedStatuses().contains(pollingState.getStatus())) {
293291
throw new CloudException("Async operation failed");
294292
}
295293

@@ -778,7 +776,7 @@ class PutPatchPollingTask<T> extends AsyncPollingTask<T> {
778776
* @param serviceCall the ServiceCall object tracking Retrofit calls.
779777
* @param clientCallback the client callback to call when a terminal status is hit.
780778
*/
781-
public PutPatchPollingTask(final PollingState<T> pollingState, final String url, final ServiceCall serviceCall, final ServiceCallback<T> clientCallback) {
779+
PutPatchPollingTask(final PollingState<T> pollingState, final String url, final ServiceCall serviceCall, final ServiceCallback<T> clientCallback) {
782780
this.serviceCall = serviceCall;
783781
this.pollingState = pollingState;
784782
this.url = url;
@@ -835,7 +833,7 @@ class PostDeletePollingTask<T> extends AsyncPollingTask<T> {
835833
* @param serviceCall the ServiceCall object tracking Retrofit calls.
836834
* @param clientCallback the client callback to call when a terminal status is hit.
837835
*/
838-
public PostDeletePollingTask(final PollingState<T> pollingState, final ServiceCall serviceCall, final ServiceCallback<T> clientCallback) {
836+
PostDeletePollingTask(final PollingState<T> pollingState, final ServiceCall serviceCall, final ServiceCallback<T> clientCallback) {
839837
this.serviceCall = serviceCall;
840838
this.pollingState = pollingState;
841839
this.clientCallback = clientCallback;
@@ -867,8 +865,7 @@ public void run() {
867865
}
868866
} else {
869867
// Check if operation failed
870-
if (AzureAsyncOperation.getFailedStatuses().contains(pollingState.getStatus()))
871-
{
868+
if (AzureAsyncOperation.getFailedStatuses().contains(pollingState.getStatus())) {
872869
clientCallback.failure(new ServiceException("Async operation failed"));
873870
} else {
874871
clientCallback.success(new ServiceResponse<>(pollingState.getResource(), pollingState.getResponse()));

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
import com.microsoft.rest.RestException;
1111

12+
import javax.xml.bind.DataBindingException;
13+
import javax.xml.ws.WebServiceException;
1214
import java.io.IOException;
1315
import java.util.ArrayList;
1416
import java.util.Collection;
@@ -17,9 +19,6 @@
1719
import java.util.ListIterator;
1820
import java.util.NoSuchElementException;
1921

20-
import javax.xml.bind.DataBindingException;
21-
import javax.xml.ws.WebServiceException;
22-
2322
/**
2423
* Defines a list response from a paging operation. The pages are
2524
* lazy initialized when an instance of this class is iterated.
@@ -128,7 +127,7 @@ private class ListItr implements ListIterator<E> {
128127
*
129128
* @param index the position in the list to start.
130129
*/
131-
public ListItr(int index) {
130+
ListItr(int index) {
132131
itemsListItr = items.listIterator(index);
133132
}
134133

build-tools/pom.xml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!--
2+
Copyright (c) Microsoft Corporation. All rights reserved.
3+
Licensed under the MIT License. See License.txt in the project root for
4+
license information.
5+
-->
6+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
7+
<modelVersion>4.0.0</modelVersion>
8+
<parent>
9+
<groupId>com.microsoft.azure</groupId>
10+
<artifactId>autorest-clientruntime-for-java</artifactId>
11+
<version>1.0.0-SNAPSHOT</version>
12+
<relativePath>../pom.xml</relativePath>
13+
</parent>
14+
15+
<artifactId>autorest-build-tools</artifactId>
16+
<packaging>jar</packaging>
17+
18+
<name>Build tools for AutoRest client runtime for Java</name>
19+
<description>This package contains the build tools for AutoRest generated Java clients.</description>
20+
<url>https://github.com/Azure/autorest-clientruntime-for-java</url>
21+
22+
<licenses>
23+
<license>
24+
<name>The MIT License (MIT)</name>
25+
<url>http://opensource.org/licenses/MIT</url>
26+
<distribution>repo</distribution>
27+
</license>
28+
</licenses>
29+
30+
<scm>
31+
<url>scm:git:https://github.com/Azure/autorest-clientruntime-for-java</url>
32+
<connection>scm:git:[email protected]:Azure/autorest-clientruntime-for-java.git</connection>
33+
<tag>HEAD</tag>
34+
</scm>
35+
36+
<properties>
37+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
38+
<legal><![CDATA[[INFO] Any downloads listed may be third party software. Microsoft grants you no rights for third party software.]]></legal>
39+
</properties>
40+
41+
<developers>
42+
<developer>
43+
<id>microsoft</id>
44+
<name>Microsoft</name>
45+
</developer>
46+
</developers>
47+
</project>

0 commit comments

Comments
 (0)