mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
make map format checker for workload specific to map structures
This commit is contained in:
parent
309cb67587
commit
a0eaf9758b
@ -164,8 +164,8 @@ public class OpsLoader {
|
||||
// into the parsers in a non-exception way
|
||||
public static boolean isYaml(String workload) {
|
||||
try {
|
||||
new Load(LoadSettings.builder().build()).loadFromString(workload);
|
||||
return true;
|
||||
Object result = new Load(LoadSettings.builder().build()).loadFromString(workload);
|
||||
return (result instanceof Map);
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user