Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Analyzer feedback for reformat method in LogLevels flags .formatted() specifically as String.format

Closed
#355 3 comments 0 reactions 1 assignee View on GitHub

@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

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.

More from exercism/java-analyzer

All issues in exercism/java-analyzer

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.