Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/bulkFileAttributesRead/beforeFieldReceiver.java
Artemiy Sartakov bcca6ef32f BulkFileAttributesReadInspection: cr fixes (IJ-CR-20279):
1. analyze all calls in method in one go
2. use UncheckedIOException instead of RuntimeException when wrapping into try catch
3. info level when try catch needed + no report in batch mode
4. updated description

GitOrigin-RevId: 0a2542b851fa32c5fde98725985f55079447b02b
2022-02-09 12:12:31 +00:00

15 lines
269 B
Java

// "Replace with bulk 'Files.readAttributes' call" "true"
import java.io.*;
class Foo {
private File file;
boolean printDirectory() {
try {
return file.isDirec<caret>tory() && file.isFile();
} catch (Exception e) {
}
return false;
}
}