Skip to content

Commit

Permalink
Update core package used and remove yamlbean dependeny
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismcg14 committed May 6, 2024
1 parent 01296d5 commit 5aacc3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ dependencies {

pluginLibs group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.14'
pluginLibs group: 'com.google.code.gson', name: 'gson', version:'2.10.1'
pluginLibs group: 'com.esotericsoftware.yamlbeans', name: 'yamlbeans', version:'1.13'

testImplementation group: 'com.github.tomakehurst', name: 'wiremock-standalone', version:'2.23.2'
testImplementation group: 'junit', name: 'junit', version:'4.13.1'
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/edu/ohio/ais/rundeck/HttpBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.dtolabs.rundeck.core.storage.ResourceMeta;
import com.dtolabs.rundeck.plugins.PluginLogger;
import com.dtolabs.rundeck.plugins.step.PluginStepContext;
import com.esotericsoftware.yamlbeans.YamlReader;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonParser;
Expand All @@ -28,6 +27,8 @@
import org.dom4j.DocumentHelper;
import org.dom4j.io.OutputFormat;
import org.dom4j.io.XMLWriter;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.Constructor;

import java.io.*;
import java.security.GeneralSecurityException;
Expand Down Expand Up @@ -438,9 +439,8 @@ public void setHeaders(String headers, RequestBuilder request){
map = new HashMap<>();
Object object = null;
try {
YamlReader reader = new YamlReader(headers);
object = reader.read();
map = (Map<String,String>) object;
Yaml yaml = new Yaml(new Constructor(Map.class));
map = yaml.load(headers);
} catch (Exception e) {
map = null;
}
Expand Down

0 comments on commit 5aacc3b

Please sign in to comment.