Visitar URL original
Merge pull request #2124 from microsoft/dependabot/gradle/com.github.… · microsoft/kiota-java@9bb825e · GitHub
Skip to content

Commit 9bb825e

Browse files
Merge pull request #2124 from microsoft/dependabot/gradle/com.github.spotbugs-6.5.6
chore(deps): bump com.github.spotbugs from 6.5.5 to 6.5.6
2 parents e6cf6cf + e26c5dd commit 9bb825e

21 files changed

Lines changed: 146 additions & 30 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"features": {
3+
"ghcr.io/devcontainers/features/github-cli:1": {
4+
"version": "1.1.0",
5+
"resolved": "ghcr.io/devcontainers/features/github-cli@sha256:d22f50b70ed75339b4eed1ba9ecde3a1791f90e88d37936517e3bace0bbad671",
6+
"integrity": "sha256:d22f50b70ed75339b4eed1ba9ecde3a1791f90e88d37936517e3bace0bbad671"
7+
},
8+
"ghcr.io/devcontainers/features/java:1": {
9+
"version": "1.8.0",
10+
"resolved": "ghcr.io/devcontainers/features/java@sha256:9663ce0219ff85786e87901ce5f0a59f488edd5f99b46015192cda48468b233a",
11+
"integrity": "sha256:9663ce0219ff85786e87901ce5f0a59f488edd5f99b46015192cda48468b233a"
12+
},
13+
"ghcr.io/devcontainers/features/node:2": {
14+
"version": "2.0.0",
15+
"resolved": "ghcr.io/devcontainers/features/node@sha256:fedd4c11f7adfb64283b578dddc7da906728daa25fa293351c9d913231acf12f",
16+
"integrity": "sha256:fedd4c11f7adfb64283b578dddc7da906728daa25fa293351c9d913231acf12f"
17+
},
18+
"ghcr.io/devcontainers/features/powershell:2": {
19+
"version": "2.0.2",
20+
"resolved": "ghcr.io/devcontainers/features/powershell@sha256:82ea3880c5706ac3963f1b5e940a7f5871835393a5472f80008148b995d58d61",
21+
"integrity": "sha256:82ea3880c5706ac3963f1b5e940a7f5871835393a5472f80008148b995d58d61"
22+
}
23+
}
24+
}

‎.devcontainer/devcontainer.json‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
{
2-
"name": "Java",
3-
"image": "mcr.microsoft.com/devcontainers/java:17",
2+
"name": "Java 21 & Gradle",
3+
"image": "mcr.microsoft.com/devcontainers/java:21-bookworm",
44
"features": {
55
"ghcr.io/devcontainers/features/java:1": {
66
"version": "none",
77
"installMaven": "true",
88
"installGradle": "true"
99
},
10-
"ghcr.io/devcontainers/features/node:1": {
10+
"ghcr.io/devcontainers/features/node:2": {
1111
"version": "lts"
1212
},
1313
"ghcr.io/devcontainers/features/github-cli:1": {},
14-
"ghcr.io/devcontainers/features/powershell:1": {}
14+
"ghcr.io/devcontainers/features/powershell:2": {}
15+
},
16+
"containerEnv": {
17+
"WAYLAND_DISPLAY": "disabled"
1518
},
1619
// Configure tool-specific properties.
1720
"customizations": {

‎.github/dependabot.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,8 @@ updates:
4848
open-telemetry:
4949
patterns:
5050
- "*opentelemetry*"
51+
- package-ecosystem: devcontainers
52+
directory: "/.devcontainer"
53+
schedule:
54+
interval: daily
55+
open-pull-requests-limit: 10

‎components/abstractions/spotBugsExcludeFilter.xml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,17 @@ xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubu
6767
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR" />
6868
<Class name="com.microsoft.kiota.store.BackingStoreFactorySingleton" />
6969
</Match>
70+
<Match>
71+
<Bug pattern="CT_CONSTRUCTOR_THROW" />
72+
<Or>
73+
<Class name="com.microsoft.kiota.ApiExceptionBuilder" />
74+
<Class name="com.microsoft.kiota.BaseRequestBuilder" />
75+
<Class name="com.microsoft.kiota.Headers" />
76+
<Class name="com.microsoft.kiota.RequestInformation" />
77+
<Class name="com.microsoft.kiota.authentication.BaseBearerTokenAuthenticationProvider" />
78+
<Class name="com.microsoft.kiota.authentication.BasicAccessAuthenticationProvider" />
79+
<Class name="com.microsoft.kiota.serialization.ParseNodeProxyFactory" />
80+
<Class name="com.microsoft.kiota.serialization.SerializationWriterProxyFactory" />
81+
</Or>
82+
</Match>
7083
</FindBugsFilter>

‎components/abstractions/src/main/java/com/microsoft/kiota/RequestInformation.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public <T extends BaseRequestConfiguration> void configure(
9191
@Nullable public String urlTemplate;
9292

9393
/** The path parameters for the current request */
94-
@Nullable public Map<String, Object> pathParameters = new HashMap<>();
94+
@Nonnull public Map<String, Object> pathParameters = new HashMap<>();
9595

9696
private URI uri;
9797

‎components/abstractions/src/main/java/com/microsoft/kiota/authentication/BaseBearerTokenAuthenticationProvider.java‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ public void authenticateRequest(
4242
} catch (URISyntaxException e) {
4343
throw new RuntimeException("Malformed URI.", e);
4444
}
45+
if (targetUri == null) {
46+
throw new IllegalStateException("Request URI cannot be null.");
47+
}
4548
String accessToken =
4649
this.accessTokenProvider.getAuthorizationToken(
4750
targetUri, additionalAuthenticationContext);

‎components/abstractions/src/main/java/com/microsoft/kiota/serialization/KiotaSerialization.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import java.io.IOException;
99
import java.io.InputStream;
1010
import java.io.UnsupportedEncodingException;
11+
import java.util.ArrayList;
1112
import java.util.List;
1213
import java.util.Objects;
1314

@@ -259,6 +260,7 @@ private static InputStream getInputStreamFromString(@Nonnull final String value)
259260
@Nonnull final InputStream stream,
260261
@Nonnull final ParsableFactory<T> parsableFactory) {
261262
final ParseNode parseNode = getRootParseNode(contentType, stream, parsableFactory);
262-
return parseNode.getCollectionOfObjectValues(parsableFactory);
263+
final List<T> values = parseNode.getCollectionOfObjectValues(parsableFactory);
264+
return values != null ? values : new ArrayList<>();
263265
}
264266
}

‎components/abstractions/src/test/java/com/microsoft/kiota/BaseRequestConfigurationTest.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ void testOptions() {
2020

2121
RequestOption requestOption =
2222
new RequestOption() {
23+
@SuppressWarnings("unchecked")
2324
@Override
2425
public <T extends RequestOption> Class<T> getType() {
25-
return null;
26+
return (Class<T>) RequestOption.class;
2627
}
2728
};
2829
// options should be mutable list

‎components/abstractions/src/test/java/com/microsoft/kiota/RequestInformationTest.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ void BuildsUrlOnProvidedBaseUrl() {
4444
requestInfo.urlTemplate = "{+baseurl}/users{?%24count}";
4545

4646
// Act
47+
assertNotNull(requestInfo.pathParameters);
4748
requestInfo.pathParameters.put("baseurl", "http://localhost");
4849

4950
// Assert

‎components/abstractions/src/test/java/com/microsoft/kiota/store/InMemoryBackingStoreTest.java‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ void TestsBackingStoreUpdateToItemInNestedCollectionWithAnotherBackedModel() {
450450
manager.setId("2fe22fe5-1132-42cf-90f9-1dc17e325a74");
451451
manager.getBackingStore().setIsInitializationCompleted(true);
452452
var collectionValues = testUserCollectionResponse.getValue();
453+
assertNotNull(collectionValues);
453454
collectionValues.get(0).setManager(manager);
454455

455456
// Assert by retrieving only changed values
@@ -504,7 +505,9 @@ void testInitializationCompletedIsPropagatedToCollectionItems() {
504505
testUser.setValue(colleagues);
505506

506507
testUser.getBackingStore().setIsInitializationCompleted(true);
507-
for (TestEntity colleague : testUser.getValue()) {
508+
final var values = testUser.getValue();
509+
assertNotNull(values);
510+
for (TestEntity colleague : values) {
508511
assertTrue(colleague.getBackingStore().getIsInitializationCompleted());
509512
}
510513
}

0 commit comments

Comments
 (0)