One way to test for empty lines is to use the regex ``++"^$"++``, which can be extremely handy when filtering out empty lines from collections of Strings, for instance. With regard to this, the Javadoc for https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/regex/Pattern.html[Pattern (Line Terminators)] states the following: ____ By default, the regular expressions ^ and ``++$++`` ignore line terminators and only match at the beginning and the end, respectively, of the entire input sequence. If ``++MULTILINE++`` mode is activated then ^ matches at the beginning of input and after any line terminator *except at the end of input*. When in ``++MULTILINE++`` mode ``++$++`` matches just before a line terminator or the end of the input sequence. ____ As emphasized, ^ is not going to match at the end of an input, and the end of the input is necessarily included in the empty string, which might lead to completely missing empty lines, while it would be the initial reason for using such regex. Therefore, when searching for empty lines using a multi-line regular expression, you should also check whether the string is empty. This rule is raising an issue every time a pattern that can match the empty string is used with ``++MULTILINE++`` flag and without calling ``++isEmpty()++`` on the string.