IDEMPIERE-6204 - Env.parseVariable returns wrong parsed message if default value is used (#2431)

This commit is contained in:
Peter Takács 2024-08-06 10:31:33 +02:00 committed by Carlos Ruiz
parent 219aeffafe
commit 61229b3277
1 changed files with 6 additions and 0 deletions

View File

@ -1738,6 +1738,8 @@ public final class Env
outStr.append("@").append(token); outStr.append("@").append(token);
if (!Util.isEmpty(format)) if (!Util.isEmpty(format))
outStr.append("<").append(format).append(">"); outStr.append("<").append(format).append(">");
if (!Util.isEmpty(defaultValue))
outStr.append(":").append(defaultValue);
outStr.append("@"); outStr.append("@");
} }
} else if (po != null && token.startsWith("=")) { } else if (po != null && token.startsWith("=")) {
@ -1759,6 +1761,8 @@ public final class Env
outStr.append("@").append(token); outStr.append("@").append(token);
if (!Util.isEmpty(format)) if (!Util.isEmpty(format))
outStr.append("<").append(format).append(">"); outStr.append("<").append(format).append(">");
if (!Util.isEmpty(defaultValue))
outStr.append(":").append(defaultValue);
outStr.append("@"); outStr.append("@");
} }
} }
@ -1776,6 +1780,8 @@ public final class Env
outStr.append("@").append(token); outStr.append("@").append(token);
if (!Util.isEmpty(format)) if (!Util.isEmpty(format))
outStr.append("<").append(format).append(">"); outStr.append("<").append(format).append(">");
if (!Util.isEmpty(defaultValue))
outStr.append(":").append(defaultValue);
outStr.append("@"); outStr.append("@");
} }
} }