I discovered, that multiple SQLs can be executed if an empty line with whitespaces is between them.
In my opinion that's not the expected behaviour, because the user cannot really recognize whitespaces in empty lines.
The source code searches for "\n\n". The attached patch is a possible solution. It uses the regular expression objects of Java to search for lines containing only whitespaces, i.e. "\n\s*\n". I do not consider my solution production ready, but it's a proof of concept to solve this issue.