Skip to content

Commit

Permalink
Merge pull request #735 from microsoft/dependabot/gradle/components/a…
Browse files Browse the repository at this point in the history
…bstractions/com.github.spotbugs-5.1.5

Bump com.github.spotbugs from 5.1.4 to 5.1.5 in /components/abstractions
  • Loading branch information
github-actions[bot] authored Oct 13, 2023
2 parents 02e7f8e + de6ba32 commit e790640
Show file tree
Hide file tree
Showing 13 changed files with 93 additions and 19 deletions.
2 changes: 1 addition & 1 deletion components/abstractions/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id 'maven-publish'
id 'signing'
id 'jacoco'
id 'com.github.spotbugs' version '5.1.4'
id 'com.github.spotbugs' version '5.1.5'
id "org.sonarqube" version "4.4.1.3373"
}

Expand Down
20 changes: 20 additions & 0 deletions components/abstractions/spotBugsExcludeFilter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,24 @@ xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubu
<Class name="com.microsoft.kiota.RequestInformation" />
</Or>
</Match>
<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW" />
<Class name="com.microsoft.kiota.authentication.ApiKeyAuthenticationProvider" />
</Match>
<Match>
<Bug code="PI" />
<Class name="com.microsoft.kiota.Headers" />
</Match>
<Match>
<Bug code="PA"/>
<Class name="com.microsoft.kiota.RequestInformation"/>
</Match>
<Match>
<Bug pattern="RV_EXCEPTION_NOT_THROWN"/>
<Class name="com.microsoft.kiota.MultiPartBodyTest" />
</Match>
<Match>
<Bug pattern="RV_EXCEPTION_NOT_THROWN"/>
<Class name="com.microsoft.kiota.authentication.ApiKeyAuthenticationProviderTest" />
</Match>
</FindBugsFilter>
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public void removeRequestOptions(@Nullable final RequestOption... options) {
}
}
/**
* Adds a response hanlder as a RequestOption.
* Adds a response handler as a RequestOption.
* @param responseHandler the response handler to add to the request.
*/
public void setResponseHandler(@Nonnull ResponseHandler responseHandler) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public ApiKeyAuthenticationProvider(@Nonnull final String apiKey, @Nonnull final
this.location = location;
this.validator = new AllowedHostsValidator(validHosts);
}
private final static String parentSpanKey = "parent-span";
private static final String parentSpanKey = "parent-span";
/** {@inheritDoc} */
@Override
@Nonnull
Expand Down
2 changes: 1 addition & 1 deletion components/http/okHttp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id 'maven-publish'
id 'signing'
id 'jacoco'
id 'com.github.spotbugs' version '5.1.4'
id 'com.github.spotbugs' version '5.1.5'
id "org.sonarqube" version "4.4.1.3373"
}

Expand Down
26 changes: 23 additions & 3 deletions components/http/okHttp/spotBugsExcludeFilter.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<FindBugsFilter
xmlns="https://github.com/spotbugs/filter/3.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
xmlns="https://github.com/spotbugs/filter/3.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
<Match>
<Bug pattern="EI_EXPOSE_REP2" />
<Or>
Expand All @@ -19,4 +19,24 @@ xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubu
<Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
<Class name="com.microsoft.kiota.http.OkHttpRequestAdapter" />
</Match>
<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW" />
<Class name="com.microsoft.kiota.http.middleware.options.RedirectHandlerOption" />
</Match>
<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW" />
<Class name="com.microsoft.kiota.http.middleware.options.RetryHandlerOption" />
</Match>
<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW" />
<Class name="com.microsoft.kiota.http.HeadersInspectionHandlerTest" />
</Match>
<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW" />
<Class name="~com\.microsoft\.kiota\.http\.OkHttpRequestAdapterTest.*" />
</Match>
<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW" />
<Class name="com.microsoft.kiota.http.UserAgentHandlerTest" />
</Match>
</FindBugsFilter>
2 changes: 1 addition & 1 deletion components/serialization/form/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id 'maven-publish'
id 'signing'
id 'jacoco'
id 'com.github.spotbugs' version '5.1.4'
id 'com.github.spotbugs' version '5.1.5'
id "org.sonarqube" version "4.4.1.3373"
}

Expand Down
20 changes: 20 additions & 0 deletions components/serialization/form/spotBugsExcludeFilter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,24 @@ xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubu
<Bug pattern="NP_BOOLEAN_RETURN_NULL" />
<Class name="com.microsoft.kiota.serialization.FormParseNode" />
</Match>
<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW" />
<Class name="com.microsoft.kiota.serialization.FormSerializationWriter" />
</Match>
<Match>
<Bug pattern="RV_EXCEPTION_NOT_THROWN"/>
<Class name="com.microsoft.kiota.serialization.FormSerializationWriterTests" />
</Match>
<Match>
<Bug pattern="RV_EXCEPTION_NOT_THROWN"/>
<Class name="com.microsoft.kiota.serialization.ParseNodeFactoryTests" />
</Match>
<Match>
<Bug pattern="RV_EXCEPTION_NOT_THROWN"/>
<Class name="com.microsoft.kiota.serialization.ParseNodeTests" />
</Match>
<Match>
<Bug pattern="RV_EXCEPTION_NOT_THROWN"/>
<Class name="com.microsoft.kiota.serialization.SerializationWriterFactoryTests" />
</Match>
</FindBugsFilter>
2 changes: 1 addition & 1 deletion components/serialization/multipart/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id 'maven-publish'
id 'signing'
id 'jacoco'
id 'com.github.spotbugs' version '5.1.4'
id 'com.github.spotbugs' version '5.1.5'
id "org.sonarqube" version "4.4.1.3373"
}

Expand Down
12 changes: 12 additions & 0 deletions components/serialization/multipart/spotBugsExcludeFilter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,16 @@ xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubu
<Class name="com.microsoft.kiota.serialization.mocks.TestEntity" />
</Or>
</Match>
<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW" />
<Class name="com.microsoft.kiota.serialization.MultipartSerializationWriter" />
</Match>
<Match>
<Bug pattern="RV_EXCEPTION_NOT_THROWN"/>
<Class name="com.microsoft.kiota.serialization.SerializationWriterFactoryTests" />
</Match>
<Match>
<Bug pattern="RV_EXCEPTION_NOT_THROWN"/>
<Class name="com.microsoft.kiota.serialization.MultipartSerializationWriterTests" />
</Match>
</FindBugsFilter>
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,22 @@
import java.time.LocalDate;
import java.time.LocalTime;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.stream.Collectors;

import com.microsoft.kiota.PeriodAndDuration;
import com.microsoft.kiota.MultipartBody;
import com.microsoft.kiota.RequestAdapter;
import com.microsoft.kiota.serialization.JsonSerializationWriterFactory;
import org.junit.jupiter.api.Test;

import com.microsoft.kiota.serialization.mocks.TestEntity;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

public class MultipartSerializationWriterTests {
class MultipartSerializationWriterTests {
@Test
public void throwsOnParsable() throws IOException, UnsupportedEncodingException {
void throwsOnParsable() throws IOException {
final var testEntity = new TestEntity();
testEntity.setId("48d31887-5fad-4d73-a9f5-3c356e68a038");
testEntity.setWorkDuration(PeriodAndDuration.parse("P1M"));
Expand All @@ -45,7 +43,7 @@ public void throwsOnParsable() throws IOException, UnsupportedEncodingException
}
private final byte[] byteForTest = new byte[] { 0x01, 0x02, 0x03 };
@Test
public void writesBytArrayValue() throws IOException {
void writesBytArrayValue() throws IOException {
try (final var serializationWriter = new MultipartSerializationWriter()) {
serializationWriter.writeByteArrayValue("key", byteForTest);
try(final var result = serializationWriter.getSerializedContent()) {
Expand All @@ -57,7 +55,7 @@ public void writesBytArrayValue() throws IOException {
}
}
@Test
public void writesAStructuredObject() throws IOException {
void writesAStructuredObject() throws IOException {
final TestEntity testEntity = new TestEntity();
testEntity.setId("48d31887-5fad-4d73-a9f5-3c356e68a038");
testEntity.setWorkDuration(PeriodAndDuration.parse("P1M"));
Expand Down
2 changes: 1 addition & 1 deletion components/serialization/text/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id 'maven-publish'
id 'signing'
id 'jacoco'
id 'com.github.spotbugs' version '5.1.4'
id 'com.github.spotbugs' version '5.1.5'
id "org.sonarqube" version "4.4.1.3373"
}

Expand Down
10 changes: 7 additions & 3 deletions components/serialization/text/spotBugsExcludeFilter.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<FindBugsFilter
xmlns="https://github.com/spotbugs/filter/3.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
xmlns="https://github.com/spotbugs/filter/3.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW" />
<Class name="com.microsoft.kiota.serialization.TextSerializationWriter" />
</Match>
</FindBugsFilter>

0 comments on commit e790640

Please sign in to comment.