Skip to content

Commit 0527191

Browse files
committed
Make code compile with java8 profile
1 parent 17dcc48 commit 0527191

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

components/serialization/json/spotBugsExcludeFilter.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubu
1818
<Or>
1919
<Class name="com.microsoft.kiota.serialization.mocks.IntersectionTypeMock" />
2020
<Class name="com.microsoft.kiota.serialization.mocks.UnionTypeMock" />
21+
<Class name="com.microsoft.kiota.serialization.TestParsable" />
2122
</Or>
2223
</Match>
2324
<Match>
@@ -31,4 +32,4 @@ xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubu
3132
<Bug pattern="NP_BOOLEAN_RETURN_NULL" />
3233
<Class name="com.microsoft.kiota.serialization.JsonParseNode" />
3334
</Match>
34-
</FindBugsFilter>
35+
</FindBugsFilter>

components/serialization/json/src/main/java/com/microsoft/kiota/serialization/DefaultGsonBuilder.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
public class DefaultGsonBuilder {
2121

2222
private static final TypeAdapter<OffsetDateTime> OFFSET_DATE_TIME =
23-
new TypeAdapter<>() {
23+
new TypeAdapter<OffsetDateTime>() {
2424
@Override
2525
public OffsetDateTime read(JsonReader in) throws IOException {
2626
String stringValue = in.nextString();
@@ -49,7 +49,7 @@ public void write(JsonWriter out, OffsetDateTime value) throws IOException {
4949
};
5050

5151
private static final TypeAdapter<LocalDate> LOCAL_DATE =
52-
new TypeAdapter<>() {
52+
new TypeAdapter<LocalDate>() {
5353
@Override
5454
public LocalDate read(JsonReader in) throws IOException {
5555
String stringValue = in.nextString();
@@ -72,7 +72,7 @@ public void write(JsonWriter out, LocalDate value) throws IOException {
7272
};
7373

7474
private static final TypeAdapter<LocalTime> LOCAL_TIME =
75-
new TypeAdapter<>() {
75+
new TypeAdapter<LocalTime>() {
7676
@Override
7777
public LocalTime read(JsonReader in) throws IOException {
7878
String stringValue = in.nextString();
@@ -95,7 +95,7 @@ public void write(JsonWriter out, LocalTime value) throws IOException {
9595
};
9696

9797
private static final TypeAdapter<PeriodAndDuration> PERIOD_AND_DURATION =
98-
new TypeAdapter<>() {
98+
new TypeAdapter<PeriodAndDuration>() {
9999
@Override
100100
public PeriodAndDuration read(JsonReader in) throws IOException {
101101
String stringValue = in.nextString();
@@ -118,7 +118,7 @@ public void write(JsonWriter out, PeriodAndDuration value) throws IOException {
118118
};
119119

120120
private static final TypeAdapter<byte[]> BYTE_ARRAY =
121-
new TypeAdapter<>() {
121+
new TypeAdapter<byte[]>() {
122122
@Override
123123
public byte[] read(JsonReader in) throws IOException {
124124
String stringValue = in.nextString();

0 commit comments

Comments
 (0)