Skip to content

Commit a3745a3

Browse files
authored
Merge pull request #216 from microsoftgraph/dev
2.0.3 release
2 parents e357282 + c5f4936 commit a3745a3

File tree

14 files changed

+83
-25
lines changed

14 files changed

+83
-25
lines changed

.github/workflows/api-level-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
lint-api-level:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v2.3.4
1818
- uses: actions/setup-java@v2
1919
with:
2020
distribution: 'adopt'
2121
java-version: 16
2222
- name: Setup Android SDK
23-
uses: android-actions/setup-android@v2
23+
uses: android-actions/setup-android@v2.0.7
2424
- name: Add execution right to the script
2525
run: chmod +x gradlew
2626
working-directory: ./android

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
steps:
1818
- name: Checkout repository
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v2.3.4
2020
with:
2121
# We must fetch at least the immediate parents so that if this is
2222
# a pull request then we can checkout the head.

.github/workflows/sample-build-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
samples-build-check-device-code:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v2.3.4
1414
- uses: actions/setup-java@v2
1515
with:
1616
distribution: 'adopt'
@@ -24,7 +24,7 @@ jobs:
2424
samples-build-check-interactive:
2525
runs-on: ubuntu-latest
2626
steps:
27-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v2.3.4
2828
- uses: actions/setup-java@v2
2929
with:
3030
distribution: 'adopt'

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ mavenGroupId = com.microsoft.graph
2525
mavenArtifactId = microsoft-graph-core
2626
mavenMajorVersion = 2
2727
mavenMinorVersion = 0
28-
mavenPatchVersion = 2
28+
mavenPatchVersion = 3
2929
mavenArtifactSuffix =
3030

3131
#These values are used to run functional tests

gradle/dependencies.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
dependencies {
22
// Use JUnit test framework
3-
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.1'
4-
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.1'
5-
testImplementation 'org.mockito:mockito-inline:3.9.0'
3+
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.2'
4+
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.2'
5+
testImplementation 'org.mockito:mockito-inline:3.10.0'
66

77
api 'com.squareup.okhttp3:okhttp:4.9.1'
88

99
implementation 'com.google.guava:guava:30.1.1-jre'
1010

11-
implementation 'com.google.code.gson:gson:2.8.6'
11+
implementation 'com.google.code.gson:gson:2.8.7'
1212
api 'com.azure:azure-core:1.16.0'
1313
}

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<dependency>
2121
<groupId>com.google.code.gson</groupId>
2222
<artifactId>gson</artifactId>
23-
<version>2.8.6</version>
23+
<version>2.8.7</version>
2424
</dependency>
2525
<dependency>
2626
<groupId>com.google.guava</groupId>
@@ -40,13 +40,13 @@
4040
<dependency>
4141
<groupId>org.junit.jupiter</groupId>
4242
<artifactId>junit-jupiter-api</artifactId>
43-
<version>5.7.1</version>
43+
<version>5.7.2</version>
4444
<scope>test</scope>
4545
</dependency>
4646
<dependency>
4747
<groupId>org.mockito</groupId>
4848
<artifactId>mockito-inline</artifactId>
49-
<version>3.9.0</version>
49+
<version>3.10.0</version>
5050
<scope>test</scope>
5151
</dependency>
5252
</dependencies>

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repositories {
2020
2121
dependencies {
2222
// Include the sdk as a dependency
23-
implementation 'com.microsoft.graph:microsoft-graph-core:2.0.2'
23+
implementation 'com.microsoft.graph:microsoft-graph-core:2.0.3'
2424
// This dependency is only needed if you are using the TokenCrendentialAuthProvider
2525
implementation 'com.azure:azure-identity:1.2.5'
2626
}
@@ -35,7 +35,7 @@ Add the dependency in `dependencies` in pom.xml
3535
<!-- Include the sdk as a dependency -->
3636
<groupId>com.microsoft.graph</groupId>
3737
<artifactId>microsoft-graph-core</artifactId>
38-
<version>2.0.2</version>
38+
<version>2.0.3</version>
3939
<!-- This dependency is only needed if you are using the TokenCrendentialAuthProvider -->
4040
<groupId>com.azure</groupId>
4141
<artifactId>azure-identity</artifactId>

src/main/java/com/microsoft/graph/content/BatchResponseStep.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
import com.microsoft.graph.http.GraphErrorResponse;
3434
import com.microsoft.graph.http.GraphFatalServiceException;
3535
import com.microsoft.graph.http.GraphServiceException;
36+
import com.microsoft.graph.logger.ILogger;
37+
import com.microsoft.graph.logger.LoggerLevel;
38+
import com.microsoft.graph.serializer.DefaultSerializer;
3639
import com.microsoft.graph.serializer.ISerializer;
3740

3841
/** Response for the batch step */
@@ -61,7 +64,13 @@ public <T2> T2 getDeserializedBody(@Nonnull final Class<T2> resultClass) throws
6164
final GraphErrorResponse error = serializer.deserializeObject((JsonElement)body, GraphErrorResponse.class);
6265
if(error == null || error.error == null) {
6366
return serializer.deserializeObject((JsonElement)body, resultClass);
64-
} else
65-
throw GraphServiceException.createFromResponse("", "", new ArrayList<>(), "", headers, "", status, error, false);
67+
} else {
68+
boolean verboseError = false;
69+
if(serializer instanceof DefaultSerializer) {
70+
final ILogger logger = ((DefaultSerializer)serializer).getLogger();
71+
verboseError = logger != null && logger.getLoggingLevel() == LoggerLevel.DEBUG;
72+
}
73+
throw GraphServiceException.createFromResponse("", "", new ArrayList<>(), "", headers, "", status, error, verboseError);
74+
}
6675
}
6776
}

src/main/java/com/microsoft/graph/http/BaseCollectionRequestBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public BaseCollectionRequestBuilder(@Nonnull final String requestUrl, @Nonnull f
4646
* @param requestOptions the options for this request
4747
* @return the IUserRequest instance
4848
*/
49-
@Nullable
49+
@Nonnull
5050
public T5 buildRequest(@Nullable final com.microsoft.graph.options.Option... requestOptions) {
5151
return buildRequest(getOptions(requestOptions));
5252
}
@@ -57,7 +57,7 @@ public T5 buildRequest(@Nullable final com.microsoft.graph.options.Option... req
5757
* @param requestOptions the options for this request
5858
* @return the IUserRequest instance
5959
*/
60-
@Nullable
60+
@Nonnull
6161
public T5 buildRequest(@Nullable final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
6262
try {
6363
return collRequestClass.getConstructor(String.class, IBaseClient.class, java.util.List.class)

src/main/java/com/microsoft/graph/http/BaseReferenceRequestBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public BaseReferenceRequestBuilder(@Nonnull final String requestUrl, @Nonnull fi
5757
* @param requestOptions the options for this request
5858
* @return The ReferenceRequest instance
5959
*/
60-
@Nullable
60+
@Nonnull
6161
public T2 buildRequest(@Nullable final com.microsoft.graph.options.Option... requestOptions) {
6262
return buildRequest(getOptions(requestOptions));
6363
}
@@ -68,7 +68,7 @@ public T2 buildRequest(@Nullable final com.microsoft.graph.options.Option... req
6868
* @param requestOptions the options for this request
6969
* @return the ReferenceRequest instance
7070
*/
71-
@Nullable
71+
@Nonnull
7272
public T2 buildRequest(@Nullable final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
7373
try {
7474
return refRequestClass.getConstructor(String.class, IBaseClient.class, java.util.List.class)

0 commit comments

Comments
 (0)