From b0391cffe904bffe1141ae62d5f58f66198d0066 Mon Sep 17 00:00:00 2001 From: nxi Date: Wed, 18 Sep 2024 22:35:28 +1000 Subject: [PATCH] fix YAML save name value pairs --- .../src/au/gov/ansto/bragg/nbi/server/yaml/YamlRestlet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bragg/nbi/au.gov.ansto.bragg.nbi.server/src/au/gov/ansto/bragg/nbi/server/yaml/YamlRestlet.java b/bragg/nbi/au.gov.ansto.bragg.nbi.server/src/au/gov/ansto/bragg/nbi/server/yaml/YamlRestlet.java index 1beb9c9ab..73ac4e4f8 100644 --- a/bragg/nbi/au.gov.ansto.bragg.nbi.server/src/au/gov/ansto/bragg/nbi/server/yaml/YamlRestlet.java +++ b/bragg/nbi/au.gov.ansto.bragg.nbi.server/src/au/gov/ansto/bragg/nbi/server/yaml/YamlRestlet.java @@ -368,7 +368,7 @@ public static void saveConfigModel(String instrumentId, String text, String mess throw new JSONException("model can not be empty"); } File file = new File(getYamlFilePath(instrumentId)); - String[] pair = text.split("&", 3); + String[] pair = text.split("&", 2); String path = pair[0].substring(pair[0].indexOf("=") + 1).trim(); // String idx = pair[1].substring(pair[1].indexOf("=") + 1).trim(); String modelString = pair[1].substring(pair[1].indexOf("=") + 1).trim();