diff --git a/.github/workflows/api-level-lint.yml b/.github/workflows/api-level-lint.yml
index 069780d68..d84787fdd 100644
--- a/.github/workflows/api-level-lint.yml
+++ b/.github/workflows/api-level-lint.yml
@@ -15,7 +15,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
- java-version: 20
+ java-version: 21
cache: gradle
- name: Setup Android SDK
uses: android-actions/setup-android@v3.2.1
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 9d3185041..6cfd35de0 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -47,7 +47,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
- java-version: 20
+ java-version: 21
distribution: 'temurin'
cache: gradle
diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml
index 1a45b54a9..7bb8af52b 100644
--- a/.github/workflows/gradle-build.yml
+++ b/.github/workflows/gradle-build.yml
@@ -13,7 +13,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
- java-version: 20
+ java-version: 21
distribution: 'temurin'
cache: gradle
- name: Detect secrets
diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml
index 82cd72f44..b94fdc7d0 100644
--- a/.github/workflows/sonarcloud.yml
+++ b/.github/workflows/sonarcloud.yml
@@ -32,7 +32,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
- java-version: 20
+ java-version: 21
distribution: 'temurin'
cache: gradle
- name: Cache SonarCloud packages
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 0b922d03d..4aa43c5d8 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "3.2.0"
+ ".": "3.2.1"
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3ebfd13ac..17c386add 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [3.2.1](https://github.com/microsoftgraph/msgraph-sdk-java-core/compare/v3.2.0...v3.2.1) (2024-09-09)
+
+
+### Bug Fixes
+
+* errorMapping in ResponseCodes with "4XX" and "5XX" Pattern ([#1735](https://github.com/microsoftgraph/msgraph-sdk-java-core/issues/1735)) ([150ff3d](https://github.com/microsoftgraph/msgraph-sdk-java-core/commit/150ff3d8d8828e30d41f9587833838232932aa0b))
+
## [3.2.0](https://github.com/microsoftgraph/msgraph-sdk-java-core/compare/v3.1.17...v3.2.0) (2024-09-03)
diff --git a/README.md b/README.md
index b0feb6d94..10c7c2bf4 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@ repositories {
dependencies {
// Include the sdk as a dependency
// x-release-please-start-version
- implementation 'com.microsoft.graph:microsoft-graph-core:3.2.0'
+ implementation 'com.microsoft.graph:microsoft-graph-core:3.2.1'
// x-release-please-end
// This dependency is only needed if you are using the TokenCredentialAuthProvider
implementation 'com.azure:azure-identity:1.11.0'
@@ -40,7 +40,7 @@ Add the dependency in `dependencies` in pom.xml
com.microsoft.graph
microsoft-graph-core
- 3.2.0
+ 3.2.1
com.azure
diff --git a/build.gradle b/build.gradle
index ed62817a5..bf7dfe51d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,7 +5,7 @@ plugins {
id 'maven-publish'
id 'signing'
id 'jacoco'
- id 'com.github.spotbugs' version '6.0.21'
+ id 'com.github.spotbugs' version '6.0.22'
id "org.sonarqube" version "5.1.0.4882"
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
}
diff --git a/gradle.properties b/gradle.properties
index cade9361b..45bcd865d 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -30,7 +30,7 @@ mavenMajorVersion = 3
mavenMinorVersion = 2
# x-release-please-end
# x-release-please-start-patch
-mavenPatchVersion = 0
+mavenPatchVersion = 1
# x-release-please-end
mavenArtifactSuffix =
diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle
index 6c320abff..6c69c6f62 100644
--- a/gradle/dependencies.gradle
+++ b/gradle/dependencies.gradle
@@ -3,9 +3,9 @@ dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.0'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.11.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.0'
- testImplementation 'org.mockito:mockito-inline:5.2.0'
- testImplementation 'io.opentelemetry:opentelemetry-api:1.41.0'
- testImplementation 'io.opentelemetry:opentelemetry-context:1.41.0'
+ testImplementation 'org.mockito:mockito-core:5.13.0'
+ testImplementation 'io.opentelemetry:opentelemetry-api:1.42.0'
+ testImplementation 'io.opentelemetry:opentelemetry-context:1.42.0'
testImplementation 'io.github.std-uritemplate:std-uritemplate:1.0.6'
implementation 'com.google.code.gson:gson:2.11.0'
diff --git a/pom.xml b/pom.xml
index 1dd2d2fe1..7c467b09f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
com.microsoft.graph
microsoft-graph-core
- 3.2.0
+ 3.2.1
pom
diff --git a/src/main/java/com/microsoft/graph/core/CoreConstants.java b/src/main/java/com/microsoft/graph/core/CoreConstants.java
index 8e1c272a1..b8dadec84 100644
--- a/src/main/java/com/microsoft/graph/core/CoreConstants.java
+++ b/src/main/java/com/microsoft/graph/core/CoreConstants.java
@@ -19,7 +19,7 @@ private static class VersionValues {
private static final int MINOR = 2;
// x-release-please-end
// x-release-please-start-patch
- private static final int PATCH = 0;
+ private static final int PATCH = 1;
// x-release-please-end
}
diff --git a/src/main/java/com/microsoft/graph/core/requests/ResponseBodyHandler.java b/src/main/java/com/microsoft/graph/core/requests/ResponseBodyHandler.java
index c66a99d0d..4547309ee 100644
--- a/src/main/java/com/microsoft/graph/core/requests/ResponseBodyHandler.java
+++ b/src/main/java/com/microsoft/graph/core/requests/ResponseBodyHandler.java
@@ -74,7 +74,7 @@ private void handleFailedResponse(Response nativeResponse, HashMap= 400 && statusCode <= 499 && errorMappings.containsKey("4XX")) &&
!(statusCode >= 500 && statusCode <= 599 && errorMappings.containsKey("5XX"))) {
throw new ApiExceptionBuilder()
@@ -83,7 +83,15 @@ private void handleFailedResponse(Response nativeResponse, HashMap= 400 && statusCode <= 499 && errorMappings.containsKey("4XX")) {
+ statusCodePattern = "4XX";
+ } else if (statusCode >= 500 && statusCode <= 599 && errorMappings.containsKey("5XX")) {
+ statusCodePattern = "5XX";
+ }
+ }
+ Parsable result = parseNode.getObjectValue(errorMappings.get(statusCodePattern));
if (!(result instanceof Exception)) {
throw new ApiException("The server returned an unexpected status code and the error registered for this code failed to deserialize: " + statusCodeString);
}