Commit Graph

2 Commits

Author SHA1 Message Date
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
Artemiy Sartakov
51b6c30a78 BulkFileAttributesReadInspection: added inspection
Inspection reports multiple java.io.File attribute calls in a row. Attribute calls:
- lastModified
- isFile
- isDirectory
- length
It suggests replacing them with a single attributes extraction using java.nio.file.Files.readAttributes method

GitOrigin-RevId: cd2f93645aab9a4cba2e1f87e05b431f0d21ee50
2022-01-31 06:31:09 +00:00