Inspectopedia
 
2024.3

'readLine' can be replaced with 'readln' or 'readlnOrNull'

Info
New
Last modified: 03 December 2024

Reports calls to readLine() that can be replaced with readln() or readlnOrNull().

Using corresponding functions makes your code simpler.

The quick-fix replaces readLine()!! with readln() and readLine() with readlnOrNull().

Examples:

After the quick-fix is applied: