[Java] Refactor: Non-constant string concatenation as argument to logging call
·
Development/Java
개요문득 눈에 들어온 코드 품질..warning의 개수를 줄이고 싶었다.그 중 눈에 들어오게 된 Non-constant string concatenation as argument to logging call. 의미문자열 연결 (+) 대신 인수로 상수를 전달하라는 경고다.상수가 아닌 문자열 연결은 로깅 메시지가 기록되지 않는 경우에도 런타임에 평가되므로 성능에 부정적인 영향을 미칠 수 있다고 한다. 로깅이 비활성화된 경우, 매개변수화된 로그 메시지를 사용하는 것이 좋다. AS-IStry { return CryptoUtil.makeHash((rawPswd + salt).getBytes(), "SHA-256");} catch (Exception e) { log.error("======= error..