각각 Files.newInputStream()Files.newOutputStream() 호출로 대체될 수 있는 new FileInputStream() 혹은 new FileOutputStream() 표현식을 보고합니다.
Files 메서드를 사용하여 생성된 스트림은 스트림 생성자로 생성한 것보다 보통 더 효율적입니다.

예:


  InputStream is = new BufferedInputStream(new FileInputStream(file));

빠른 수정을 적용한 후:


  InputStream is = new BufferedInputStream(Files.newInputStream(file.toPath()));

언어 수준이 10 이상이지만 빠른 수정이 여전히 사용 가능하면 이 검사에 경고가 표시되지 않습니다.

이 검사는 프로젝트 또는 모듈의 언어 수준이 7 이상인 경우에만 보고합니다.

2022.1의 새로운 기능