System.getProperty(str)
メソッドの使用箇所を報告し、以下の 2 つの場合に修正を提案します。
System.getProperty("path.separator")
-> File.pathSeparator
System.getProperty("line.separator")
-> System.lineSeparator()
System.getProperty("line.separator")
が毎回プロパティ (実装に応じて Hashtable または CHM) を呼び出すのに対し、System.lineSeparator()
はキャッシュされた値を返すためです。