Skip to content

Commit

Permalink
Update snakeyaml to the latest version available in oompt update site.
Browse files Browse the repository at this point in the history
…fixes #2198

Signed-off-by: Ondrej Dockal <odockal@redhat.com>
  • Loading branch information
odockal authored and olkornii committed Jul 19, 2023
1 parent 771e8b1 commit a1298a5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion plugins/org.eclipse.reddeer.junit/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.core.runtime,
com.fasterxml.jackson.core.jackson-core,
com.fasterxml.jackson.core.jackson-databind,
org.json;bundle-version="1.0.0",
org.yaml.snakeyaml;bundle-version="1.14.0"
org.yaml.snakeyaml
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ClassPath: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
import org.eclipse.reddeer.junit.requirement.RequirementException;
import org.eclipse.reddeer.junit.requirement.configuration.RequirementConfiguration;
import org.json.JSONObject;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.SafeConstructor;
import org.yaml.snakeyaml.constructor.Constructor;

import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
Expand Down Expand Up @@ -86,7 +87,7 @@ public List<RequirementConfiguration> loadConfigurations(File file) {

@SuppressWarnings("unchecked")
private String convertYamlToJson(File file) throws FileNotFoundException {
Map<String,Object> map= (Map<String, Object>) new Yaml(new SafeConstructor()).load(new FileReader(file));
Map<String,Object> map= (Map<String, Object>) new Yaml(new Constructor(new LoaderOptions())).load(new FileReader(file));
JSONObject jsonObject = new JSONObject(map);
return jsonObject.toString();
}
Expand Down
11 changes: 3 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
<swtbot-update-site>https://download.eclipse.org/technology/swtbot/snapshots/</swtbot-update-site>
<!-- when making final release, switch from S to R latest update site - https://github.com/eclipse/reddeer/issues/2100 -->
<!--eclipse-orbit-update-site>https://download.eclipse.org/tools/orbit/downloads/latest-R/</eclipse-orbit-update-site-->
<eclipse-orbit-update-site>https://download.eclipse.org/tools/orbit/downloads/latest-S/</eclipse-orbit-update-site>
<!--eclipse-oomph-update-site>https://download.eclipse.org/oomph/simrel-orbit/2023-09/</eclipse-oomph-update-site-->
<!--eclipse-orbit-update-site>https://download.eclipse.org/tools/orbit/downloads/latest-S/</eclipse-orbit-update-site-->
<eclipse-oomph-update-site>https://download.eclipse.org/oomph/simrel-orbit/2023-09/</eclipse-oomph-update-site>
<cbi-repo-site>https://repo.eclipse.org/content/repositories/cbi-releases/</cbi-repo-site>
<download-plugin-version>1.2.1</download-plugin-version>
<java.target.version>17</java.target.version>
Expand Down Expand Up @@ -207,15 +207,10 @@
</releases>
</repository>
<repository>
<id>eclipse-orbit-update-site</id>
<url>${eclipse-orbit-update-site}</url>
<layout>p2</layout>
</repository>
<!--repository>
<id>eclipse-oomph-update-site</id>
<url>${eclipse-oomph-update-site}</url>
<layout>p2</layout>
</repository-->
</repository>
</repositories>

<pluginRepositories>
Expand Down

0 comments on commit a1298a5

Please sign in to comment.