The sonar reports the “Remove this unused import ‘java.lang.System.lineSeparator’” error for the below mentioned line of code:
import static java.lang.System.lineSeparator;
While I know that the java.lang imports are not required to be manually declared into the source code, this is not true for the static imports. The developers can use the static imports just to make the code shorter and/or cleaner. Exactly this is the case in our code as well.
SonarJava version: 5.13.1 (build 18282)
IDE: Spring Tool Suite 4.4.1.RELEASE