Skip to content

Commit

Permalink
upgrade jackson & snakeyaml
Browse files Browse the repository at this point in the history
  • Loading branch information
skudikala authored and jhaber committed Jul 16, 2024
1 parent 9f666a9 commit c020454
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
import java.util.stream.Collectors;

import io.fabric8.kubernetes.client.utils.serialization.UnmatchedFieldTypeModule;

import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.SafeConstructor;

Expand Down Expand Up @@ -370,7 +372,7 @@ private static String readSpecFileFromInputStream(InputStream inputStream) {
}

private static <T> T unmarshalYaml(InputStream is, TypeReference<T> type) throws JsonProcessingException {
final Yaml yaml = new Yaml(new SafeConstructor());
final Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()));
Map<String, Object> obj = yaml.load(is);
String objAsJsonStr = JSON_MAPPER.writeValueAsString(obj);
return unmarshalJsonStr(objAsJsonStr, type);
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<okhttp.bundle.version>3.12.1_1</okhttp.bundle.version>
<okio.version>1.15.0</okio.version>
<okio.bundle.version>1.15.0_1</okio.bundle.version>
<jackson.version>2.13.1</jackson.version>
<jackson.version>2.15.3</jackson.version>
<mockwebserver.version>0.2.2</mockwebserver.version>

<!-- API versions -->
Expand Down Expand Up @@ -113,7 +113,7 @@
<slf4j.version>1.7.33</slf4j.version>
<mockito.version>4.2.0</mockito.version>
<lombok.version>1.18.22</lombok.version>
<snakeyaml.version>1.28</snakeyaml.version>
<snakeyaml.version>2.2</snakeyaml.version>
<bouncycastle.version>1.70</bouncycastle.version>
<commons-compress.version>1.21</commons-compress.version>
<scr.annotations.version>1.12.0</scr.annotations.version>
Expand Down

0 comments on commit c020454

Please sign in to comment.