mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
StreamApiMigrationInspection: BufferedReaderSource is considered non-trivial to mimic old behavior
This commit is contained in:
+6
-1
@@ -556,7 +556,12 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo
|
||||
// Don't suggest to convert the loop which can be trivially replaced via addAll:
|
||||
// this is covered by UseBulkOperationInspection and ManualArrayToCollectionCopyInspection
|
||||
if(addAll) return null;
|
||||
if(!REPLACE_TRIVIAL_FOREACH && !tb.hasOperations() && terminal.isTrivial()) return null;
|
||||
if (!REPLACE_TRIVIAL_FOREACH &&
|
||||
!tb.hasOperations() &&
|
||||
!(tb.getLastOperation() instanceof BufferedReaderLines) &&
|
||||
terminal.isTrivial()) {
|
||||
return null;
|
||||
}
|
||||
return new CollectMigration(terminal.getMethodName());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user