Skip to content

Commit 8007610

Browse files
authored
Merge pull request #1407 from microsoftgraph/dependabot/gradle/v3/longTermBranch/com.github.spotbugs-6.0.4
chore(deps): bump com.github.spotbugs from 6.0.2 to 6.0.4
2 parents 4ada498 + b118768 commit 8007610

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
id 'maven-publish'
66
id 'signing'
77
id 'jacoco'
8-
id 'com.github.spotbugs' version '6.0.2'
8+
id 'com.github.spotbugs' version '6.0.4'
99
id "org.sonarqube" version "4.4.1.3373"
1010
}
1111

src/main/java/com/microsoft/graph/core/requests/BaseGraphRequestAdapter.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,14 @@ public BaseGraphRequestAdapter(@Nonnull AuthenticationProvider authenticationPro
153153
this(authenticationProvider, determineBaseAddress(cloud, version), graphClientOption);
154154
}
155155

156-
private static String determineBaseAddress(@Nullable Clouds nationalCloud, @Nullable String version) throws IllegalArgumentException {
157-
String cloud = nationalCloud == null ? getCloudList().get(Clouds.GLOBAL_CLOUD) : getCloudList().get(nationalCloud);
156+
private static String determineBaseAddress(@Nullable final Clouds nationalCloud, @Nullable final String version) {
157+
final String cloud = nationalCloud == null ? getCloudList().get(Clouds.GLOBAL_CLOUD) : getCloudList().get(nationalCloud);
158158
if(cloud == null) {
159159
throw new IllegalArgumentException(nationalCloud+" is an unexpected national cloud.");
160160
}
161161
return version == null ? (cloud+"/v1.0") : (cloud+"/"+version);
162162
}
163+
protected final void finalize() throws Throwable{
164+
// to avoid finalizer attacks on the constructors defensive programming
165+
}
163166
}

0 commit comments

Comments
 (0)