exercism / exercism/java-analyzer

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

Abierto
#355 3 comentarios 0 reacciones 1 asignado Reclamado por @Thakurji890 Ver en GitHub
Lenguaje dominante
Java
Estrellas
13
Forks
27
Merge medio
4 d 9 h
PR fusionados (30 d)
6

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.