We're generating painless scripts from higher-level condition representations. One obvious workaround there is to prevent the generator from outputting the condition in the first place, when the block would be empty. Or, add a no-op like "true", as above. Or, like you say, re-write to remove the whole "if".
Certainly, this is not a bug. I think it's just odd. Don't have practically all bracket-style languages a definition for "block-statement" like "block-statement := { statement-list }" with "statement-list := empty, or a statement-list followed by a statement".
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.