Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
f6594b0
Bump github/codeql-action from 1 to 2
dependabot[bot] Apr 26, 2022
7a7616e
Bump rickstaa/action-create-tag from 1.2.2 to 1.3.1
dependabot[bot] Apr 27, 2022
eaf6538
Merge pull request #499 from microsoftgraph/dependabot/github_actions…
baywet Apr 30, 2022
6e44c4a
Merge pull request #498 from microsoftgraph/dependabot/github_actions…
baywet Apr 30, 2022
c065144
Bump spotbugs-annotations from 4.6.0 to 4.7.0
dependabot[bot] May 5, 2022
83cd708
Bump spotbugs-annotations from 4.6.0 to 4.7.0 in /android
dependabot[bot] May 5, 2022
00589f2
Merge pull request #501 from microsoftgraph/dependabot/gradle/android…
baywet May 5, 2022
1e37cd4
Merge pull request #500 from microsoftgraph/dependabot/gradle/com.git…
baywet May 5, 2022
b831f8c
Bump azure-core from 1.27.0 to 1.28.0
dependabot[bot] May 9, 2022
e2b6f5f
Bump azure-core from 1.27.0 to 1.28.0
dependabot[bot] May 9, 2022
c9d1a57
Bump azure-core from 1.27.0 to 1.28.0 in /android
dependabot[bot] May 9, 2022
7325a08
Bump azure-identity from 1.5.0 to 1.5.1 in /samples/deviceCodeSample
dependabot[bot] May 9, 2022
cb2d54f
Merge pull request #507 from microsoftgraph/dependabot/gradle/samples…
baywet May 9, 2022
66f288b
Merge pull request #506 from microsoftgraph/dependabot/gradle/android…
baywet May 9, 2022
29eaa16
Bump azure-identity in /samples/interactiveBrowserSample
dependabot[bot] May 9, 2022
d321b8e
Merge pull request #505 from microsoftgraph/dependabot/gradle/samples…
baywet May 9, 2022
f7bb3a0
Merge pull request #504 from microsoftgraph/dependabot/maven/com.azur…
baywet May 9, 2022
f287d35
Merge pull request #503 from microsoftgraph/dependabot/gradle/com.azu…
baywet May 9, 2022
c67a57d
Bump gradle from 7.1.3 to 7.2.0 in /android
dependabot[bot] May 10, 2022
8254679
Merge pull request #508 from microsoftgraph/dependabot/gradle/android…
baywet May 10, 2022
7af78fa
Bump com.github.spotbugs from 5.0.6 to 5.0.7
dependabot[bot] May 13, 2022
50dc24f
Bump gradle-enterprise-gradle-plugin from 3.10 to 3.10.1 in /android
dependabot[bot] May 19, 2022
ea24bcf
Merge pull request #512 from microsoftgraph/dependabot/gradle/android…
baywet May 19, 2022
fe547eb
Bump rickstaa/action-create-tag from 1.3.1 to 1.3.2
dependabot[bot] May 24, 2022
113f256
Merge pull request #513 from microsoftgraph/dependabot/github_actions…
baywet May 24, 2022
57891a8
- bumps the android tooling version to unlock CI
baywet May 25, 2022
0823f18
Merge pull request #515 from microsoftgraph/feature/update-android
baywet May 25, 2022
b1003c3
Log message of GraphServiceException only once gh-480
qavid May 25, 2022
cc485f4
- adds changelog entry for error message fix
baywet May 25, 2022
355822f
Merge pull request #514 from qavid/bugfix/gh-480
baywet May 25, 2022
9e5890f
Suppress FB Warnings on Tests, Make some Exceptions Explicit
ramsessanchez May 26, 2022
52e51ef
RollBack breaking changes
ramsessanchez May 26, 2022
3d41fbd
Merge pull request #509 from microsoftgraph/dependabot/gradle/com.git…
baywet May 26, 2022
3e236ce
Update CHANGELOG.md
ramsessanchez May 26, 2022
df07735
Apply suggestions from code review
baywet May 26, 2022
e666efb
Merge pull request #517 from microsoftgraph/changelog-prep-for-2.0.13
baywet May 26, 2022
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 .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
run: .\scripts\getLatestVersion.ps1
shell: pwsh
- name: Create tag
uses: rickstaa/action-create-tag@v1.2.2
uses: rickstaa/action-create-tag@v1.3.2
with:
tag: ${{ steps.GetVersion.outputs.tag }}
- name: Queue Git Release
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
# Override language selection by uncommenting this and choosing your languages
with:
languages: java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -57,4 +57,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

## [2.0.13] - 2022-05-26

### Added

### Changed

- Fixed an issue where the error message would be logged twice. #514
- Bumps azure-core to 1.28.0 #503, #504, #506
- Bumps azure-identity to 1.5.1 #505, #507

## [2.0.12] - 2022-04-22

### Added
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ buildscript {
}

dependencies {
classpath "com.gradle:gradle-enterprise-gradle-plugin:3.10"
classpath "com.android.tools.build:gradle:7.1.3"
classpath "com.gradle:gradle-enterprise-gradle-plugin:3.10.1"
classpath "com.android.tools.build:gradle:7.2.1"
classpath "com.github.ben-manes:gradle-versions-plugin:0.42.0"
}
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins {
id 'maven-publish'
id 'signing'
id 'jacoco'
id 'com.github.spotbugs' version '5.0.6'
id 'com.github.spotbugs' version '5.0.7'
id "org.sonarqube" version "3.3"
}

Expand Down
6 changes: 3 additions & 3 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ dependencies {
implementation 'com.google.guava:guava:31.1-jre'

implementation 'com.google.code.gson:gson:2.9.0'
api 'com.azure:azure-core:1.27.0'
api 'com.azure:azure-core:1.28.0'

compileOnly 'net.jcip:jcip-annotations:1.0'
compileOnly 'com.github.spotbugs:spotbugs-annotations:4.6.0'
compileOnly 'com.github.spotbugs:spotbugs-annotations:4.7.0'
testCompileOnly 'net.jcip:jcip-annotations:1.0'
testCompileOnly 'com.github.spotbugs:spotbugs-annotations:4.5.3'
testCompileOnly 'com.github.spotbugs:spotbugs-annotations:4.7.0'
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.27.0</version>
<version>1.28.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down
2 changes: 1 addition & 1 deletion samples/deviceCodeSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ repositories {
dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
implementation project(':coreLibrary')
implementation 'com.azure:azure-identity:1.5.0'
implementation 'com.azure:azure-identity:1.5.1'
}
2 changes: 1 addition & 1 deletion samples/interactiveBrowserSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ repositories {
dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
implementation project(':coreLibrary')
implementation 'com.azure:azure-identity:1.5.0'
implementation 'com.azure:azure-identity:1.5.1'
}
4 changes: 1 addition & 3 deletions src/main/java/com/microsoft/graph/http/CoreHttpProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import com.microsoft.graph.httpcore.middlewareoption.RedirectOptions;
import com.microsoft.graph.httpcore.middlewareoption.RetryOptions;
import com.microsoft.graph.logger.ILogger;
import com.microsoft.graph.logger.LoggerLevel;
import com.microsoft.graph.options.HeaderOption;
import com.microsoft.graph.serializer.ISerializer;

Expand Down Expand Up @@ -489,8 +488,7 @@ private <Result, Body, DeserializeType> Result processResponse(final Response re
}
}
} catch (final GraphServiceException ex) {
final boolean shouldLogVerbosely = logger.getLoggingLevel() == LoggerLevel.DEBUG;
logger.logError("Graph service exception " + ex.getMessage(shouldLogVerbosely), ex);
logger.logError("Graph service exception", ex);
throw ex;
} catch (final Exception ex) {
final ClientException clientException = new ClientException("Error during http request",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

package com.microsoft.graph.http;


import com.microsoft.graph.logger.ILogger;
import com.microsoft.graph.serializer.ISerializer;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import javax.annotation.Nullable;
import javax.annotation.Nonnull;
Expand All @@ -50,6 +50,7 @@ public interface IStatefulResponseHandler<ResultType, DeserializedType> {
* @throws Exception an exception occurs if the request was unable to complete for any reason
*/
@Nullable
@SuppressFBWarnings
<ResponseType> ResultType generateResult(@Nonnull final IHttpRequest request,
@Nonnull final ResponseType response,
@Nonnull final ISerializer serializer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import okhttp3.MediaType;
import okhttp3.Response;
import okhttp3.ResponseBody;
Expand Down Expand Up @@ -72,6 +73,7 @@ protected LargeFileUploadResponseHandler(@Nonnull final Class<UploadType> upload

@Override
@Nullable
@SuppressFBWarnings
public <ResponseType> LargeFileUploadResponse<UploadType> generateResult(
@Nonnull final IHttpRequest request,
@Nonnull final ResponseType response,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.microsoft.graph.core.ClientException;
import com.microsoft.graph.core.IBaseClient;
import com.microsoft.graph.options.Option;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -99,6 +100,7 @@ public class LargeFileUploadTask<UploadType> {
* @param streamSize the stream size
* @param uploadTypeClass the upload type class
*/
@SuppressFBWarnings
public LargeFileUploadTask(@Nonnull final IUploadSession uploadSession,
@Nonnull final IBaseClient<?> client,
@Nonnull final InputStream inputStream,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.azure.core.credential.TokenCredential;
import com.microsoft.graph.mocks.MockTokenCredential;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;
Expand All @@ -13,6 +14,7 @@
import java.util.ArrayList;
import java.util.concurrent.ExecutionException;

@SuppressFBWarnings
public class TokenCredentialAuthProviderTest {

private static final String testToken = "CredentialTestToken";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.microsoft.graph.serializer.IJsonBackedObject;
import com.microsoft.graph.serializer.ISerializer;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
Expand All @@ -41,6 +42,7 @@
import okhttp3.Response;
import okhttp3.ResponseBody;

@SuppressFBWarnings
class BatchRequestContentTest {

String testurl = "http://graph.microsoft.com/v1.0/me";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
import com.microsoft.graph.serializer.DefaultSerializer;
import com.microsoft.graph.serializer.ISerializer;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.junit.jupiter.api.Test;

@SuppressFBWarnings
public class BatchResponseContentTest {
@Test
public void testValidBatchResponseContent() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class BaseClientTests {
private ISerializer mSerializer;

@BeforeEach
public void setUp() throws Exception {
public void setUp() {
baseClient = new BaseClient<>();
mLogger = mock(ILogger.class);
mSerializer = mock(ISerializer.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class ClientExceptionTests {
private String expectMessage = "This is test exception message";

@BeforeEach
public void setUp() throws Exception {
public void setUp() {
clientException = new ClientException(expectMessage, null);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import java.util.Map;
import java.util.concurrent.CompletableFuture;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.junit.jupiter.api.Test;

import okhttp3.Request;
Expand All @@ -28,6 +29,7 @@

import javax.annotation.Nullable;

@SuppressFBWarnings
public class GraphServiceClientTest {
private IAuthenticationProvider getAuthProvider() {
return mock(IAuthenticationProvider.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class BaseCollectionPageTests {

@BeforeEach
@SuppressWarnings("unchecked")
public void setUp() throws Exception {
public void setUp() {
list = new ArrayList<String>();
list.add("Object1");
list.add("Object2");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.microsoft.graph.options.QueryOption;
import com.microsoft.graph.serializer.ISerializer;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

Expand Down Expand Up @@ -56,6 +57,7 @@ public class BaseCollectionRequestTests {
private BaseEntityCollectionRequest<JsonObject, ICollectionResponse<JsonObject>, BaseCollectionPage<JsonObject, BaseRequestBuilder<JsonObject>>> mRequest;

@BeforeEach
@SuppressFBWarnings
@SuppressWarnings("unchecked")
public void setUp() throws Exception {
mBaseClient = mock(IBaseClient.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class BaseRequestBuilderTests {
private BaseRequestBuilder<String> baseRequestBuilder;

@BeforeEach
public void setUp() throws Exception {
public void setUp() {
baseRequestBuilder = new BaseRequestBuilder<>(expectedRequestUrl, mock(IBaseClient.class), null){};
}

Expand Down
2 changes: 2 additions & 0 deletions src/test/java/com/microsoft/graph/http/BaseRequestTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import static org.mockito.Mockito.mock;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

Expand All @@ -37,6 +38,7 @@ public class BaseRequestTests {
private BaseRequest<JsonObject> mRequest;

@BeforeEach
@SuppressFBWarnings
public void setUp() throws Exception {
final Response response = new Response.Builder()
.request(new Request.Builder().url("https://a.b.c").build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.io.InputStream;
import java.util.concurrent.ExecutionException;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.stubbing.Answer;
Expand All @@ -33,13 +34,14 @@
/**
* Test cases for {@see BaseStreamRequest}
*/
@SuppressFBWarnings
public class BaseStreamRequestTests {

private BaseClient<Request> mBaseClient;

@BeforeEach
@SuppressWarnings("unchecked")
public void setUp() throws Exception {
public void setUp() {
mBaseClient = mock(BaseClient.class);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
import java.io.IOException;
import java.util.concurrent.ExecutionException;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.junit.jupiter.api.Test;

import okhttp3.Call;
import okhttp3.Response;

@SuppressFBWarnings
class CoreHttpCallbackFutureWrapperTests {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.microsoft.graph.serializer.DefaultSerializer;
import com.microsoft.graph.serializer.ISerializer;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import okio.Buffer;
import org.junit.jupiter.api.Test;

Expand Down Expand Up @@ -62,6 +63,7 @@ class CoreHttpProviderTests {
private Gson GSON = new GsonBuilder().create();

@Test
@SuppressFBWarnings
void testErrorResponse() throws Exception {
final GraphErrorCodes expectedErrorCode = GraphErrorCodes.INVALID_REQUEST;
final String expectedMessage = "Test error!";
Expand All @@ -85,6 +87,7 @@ void testErrorResponse() throws Exception {
}

@Test
@SuppressFBWarnings
void testVerboseErrorResponse() throws Exception {
final GraphErrorCodes expectedErrorCode = GraphErrorCodes.INVALID_REQUEST;
final String expectedMessage = "Test error!";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
import java.net.URL;
import java.util.concurrent.CompletableFuture;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.junit.jupiter.api.Test;

import okhttp3.OkHttpClient;
import okhttp3.Request;

public class AuthenticationHandlerTest {
@Test
@SuppressFBWarnings
public void testAuthenticationHandler() throws Exception {
IAuthenticationProvider authProvider = mock(IAuthenticationProvider.class);
when(authProvider.getAuthorizationTokenAsync(any(URL.class))).thenReturn(CompletableFuture.completedFuture("a token"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.io.IOException;
import java.net.HttpURLConnection;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.junit.jupiter.api.Test;

import com.microsoft.graph.httpcore.middlewareoption.IShouldRetry;
Expand All @@ -21,6 +22,7 @@
import okhttp3.Response;
import okio.BufferedSink;

@SuppressFBWarnings
public class RetryHandlerTest {

private static final String testmeurl = "https://graph.microsoft.com/v1.0/me";
Expand Down
Loading