From 43e7f45f19e952e2b5213aa87351b7922f8b87dd Mon Sep 17 00:00:00 2001 From: Will Lehman Date: Thu, 23 Feb 2023 09:32:35 -0500 Subject: [PATCH] illegal escape on replace first --- build.gradle | 2 +- src/main/java/usace/wat/plugin/PluginManager.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 32e9d5b..3be8e97 100644 --- a/build.gradle +++ b/build.gradle @@ -51,5 +51,5 @@ publishing { } group 'mil.army.usace.hec' - version '0.0.21' + version '0.0.22' } diff --git a/src/main/java/usace/wat/plugin/PluginManager.java b/src/main/java/usace/wat/plugin/PluginManager.java index 19e75a7..fa58793 100644 --- a/src/main/java/usace/wat/plugin/PluginManager.java +++ b/src/main/java/usace/wat/plugin/PluginManager.java @@ -70,12 +70,12 @@ private void substituteDataSourcePath(String path) { switch(prefix){ case "ENV": String val = System.getenv(parts[1]); - path = path.replaceFirst("{"+result+"}", val);//? + path = path.replaceFirst("\\{"+result+"\\}", val);//? m = p.matcher(path); break; case "ATTR": String valattr = _payload.getAttributes().get(parts[1]).toString(); - path = path.replaceFirst("{"+result+"}", valattr);//? + path = path.replaceFirst("\\{"+result+"\\}", valattr);//? m = p.matcher(path); break; default: