vmware / vmware/singleton

[BUG] [Java Client]Can't accept map key as c.b.d(dot in the key name) in Named arguments to format message.

Open
#644 2 comments 0 reactions 1 assignee View on GitHub

@huihuiw01 is already working on this.

Since Oct 11, 2022.

area/java-client kind/bug priority/medium
Dominant language
Java
Stars
72
Forks
69
Avg merge
23h 32m
Merged PRs (30d)
4

Description

Describe the bug
Can't accept map key as a.b.c(dot in the key name) in Named arguments to format message.
Can't get corresponding message if message like below:
"messages.placeholder": "Messages {a}, {b} and {c.b.d} in source"

To Reproduce
Steps to reproduce the behavior:
1.
String msg = "信息 {a}, {b} 以及 {c.b.d} 在资源里";
Map<String, Object> msgargs1 = new HashMap<>();
msgargs1.put("a", "The 1st Message");
msgargs1.put("b", "信息二");
msgargs1.put("c.b.d", "The 3rd message");

FormatUtils.formatMsg(msg, ZHCN, msgargs1);

Expected behavior
java.lang.IllegalArgumentException: Bad argument syntax: [at pattern index 16] "c.b.d} 在资源里"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.