[오류내용]
Format specifiers should be used instead of string concatenation.
Printf-style format strings should be used correctly.
[해결방안]
CASE 1 :
logger.debug( "ifKey1 : {}", ifKey2 );
CASE 2 :
System.out.println( String.format("ifKey1 : %s", ifKey2) );
slf4j Logger 사용법은 아래 링크 참고하길 바란다.
https://www.slf4j.org/api/org/slf4j/helpers/MessageFormatter.html
MessageFormatter (SLF4J 2.0.1 API)
Formats messages according to very simple substitution rules. Substitutions can be made 1, 2 or more arguments. For example, MessageFormatter.format("Hi {}.", "there") will return the string "Hi there.". The {} pair is called the formatting anchor. It serv
www.slf4j.org
String.format 관련 자세한 사용법은 아래 링크 참고하길 바란다.
https://sealove3904.tistory.com/31?category=968915
String.format() 사용방법
API 문서를 번역하면 지정된 형식 문자열과 인수를 사용하여 형식이 지정된 문자열을 반환합니다. 반환한 로케일 항상 Locale.getDefault() 입니다. [실행결과] [첨부파일] 더 자세한 내용은 아래 링크
sealove3904.tistory.com
'IT 인터넷 > 소나큐브' 카테고리의 다른 글
[소나큐브] Null pointers should not be dereferenced. (0) | 2022.10.13 |
---|---|
[소나큐브] Unnecessary imports should be removed. (0) | 2022.10.13 |
[소나큐브] Collection.isEmpty() should be used to test for emptiness (0) | 2022.10.12 |
[소나큐브] Field names should comply with a naming convention (0) | 2022.10.12 |
[소나큐브] String literals should not be duplicated (0) | 2022.10.12 |