Analyzer feedback for reformat method in LogLevels flags .formatted() specifically as String.format
@Thakurji890 is already working on this.
Since Sep 9, 2026.
Assessment
This issue has not been assessed yet.
Description
In the LogLevels exercise (Java track), I used the Java 15+ instance method String.formatted() to concatenate the final log message in the reformat method:
return "%s (%s)".formatted(textMsg, textLevel);
The automated Java Analyzer flagged this and suggested using the + operator for performance reasons. However, the feedback message explicitly references the older static method String.format instead of the one I actually used (.formatted()).
While I understand the performance suggestion to use standard string concatenation (+) for simple cases, the analyzer's feedback text should ideally recognize the .formatted() method or be reworded to encompass both formatting approaches to avoid confusion.
Just a minor tweak for the analyzer's message accuracy! Thanks for maintaining this track.
- Dominant language
- Java
- Stars
- 13
- Forks
- 27
- Avg merge
- 4d 17h
- Merged PRs (30d)
- 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from exercism/java-analyzer
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
exercism/java-analyzer#298 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
exercism/java-analyzer#271 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
exercism/java-analyzer#227 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
exercism/java-analyzer#218 · 3 comments ·
-
x:size/small
exercism/java-analyzer#176 · 1 comment · 1 assignee ·
All issues in exercism/java-analyzer
Similar issues
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/flink-agents#1152 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
jenkinsci/blueocean-plugin#5417 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
objectionary/eo-graphs#75 ·