"SIMPLE".toLowerCase().equals("simple")is not true if your default locale is Turkish, but your code is written in English. Turkish has two "i" characters, one with a dot and one without, which throws the above code off balance. The fix is to write the expression either as
"SIMPLE".toLowerCase(Locale.ENGLISH).equals("simple")or even better as
I just stumbled on this issue with Apache Tika (see TIKA-404), and it seems like I'm not the only one.