Revise functions in PathReadWrite
- Adjust implementations to avoid excessive vararg copies - Remove options from forEachLine, it doesn't make much sense and isn't consistent with the other read* functions. - Revise inlineness of functions in PathReadWrite - Compact implementations of those that are remained inline. - Clarify docs of functions for reading the entire file #KT-19192
This commit is contained in:
@@ -35,7 +35,7 @@ class PathReadWriteTest {
|
||||
writer.close()
|
||||
|
||||
val list = ArrayList<String>()
|
||||
file.forEachLine(charset = Charsets.UTF_8, options = arrayOf(StandardOpenOption.READ)) {
|
||||
file.forEachLine(charset = Charsets.UTF_8) {
|
||||
list.add(it)
|
||||
}
|
||||
assertEquals(listOf("Hello", "World"), list)
|
||||
|
||||
Reference in New Issue
Block a user