exercism / exercism/java-analyzer

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

オープン
#355 コメント 3 件 リアクション 0 件 担当者 1 名 @Thakurji890 が担当を希望しています GitHub で見る
主要言語
Java
スター
13
フォーク
27
平均マージ
4日 9時間
マージ済み PR(30日)
6

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。