From 67d1b4fbfc247b08c1cf155d00c05258bce9d247 Mon Sep 17 00:00:00 2001 From: Mike Bender Date: Tue, 30 Apr 2024 11:52:07 -0400 Subject: [PATCH] fix: Could not re-open application created variables (#5435) - Passing in a VariableDescriptor with a valid ID was not creating a proper VariableDefinition - It's checking "s/" specifically, whereas application variable is prefixed with "a/" - Tested by following the steps in the description. --- .../deephaven/web/client/api/console/JsVariableDefinition.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/console/JsVariableDefinition.java b/web/client-api/src/main/java/io/deephaven/web/client/api/console/JsVariableDefinition.java index 8e8ab300d35..293ef65b1ee 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/console/JsVariableDefinition.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/console/JsVariableDefinition.java @@ -29,7 +29,8 @@ public class JsVariableDefinition { public JsVariableDefinition(String type, String title, String id, String description) { // base64('s/' + str) starts with 'cy8' or 'cy9' - if (!id.startsWith("cy")) { + // base64('a/' + str) starts with 'YS8' or 'YS9' + if (!id.startsWith("cy") && !id.startsWith("YS")) { throw new IllegalArgumentException("Cannot create a VariableDefinition from a non-scope ticket"); } this.type = type;