diff --git a/trunk/JLanguageTool/src/java/de/danielnaber/languagetool/rules/patterns/Match.java b/trunk/JLanguageTool/src/java/de/danielnaber/languagetool/rules/patterns/Match.java
index <HASH>..<HASH> 100644
--- a/trunk/JLanguageTool/src/java/de/danielnaber/languagetool/rules/patterns/Match.java
+++ b/trunk/JLanguageTool/src/java/de/danielnaber/languagetool/rules/patterns/Match.java
@@ -419,6 +419,9 @@ public class Match {
    * @return Converted string.
    */
   private String convertCase(final String s) {
+    if (StringTools.isEmpty(s)) {
+      return s;
+    }
     String token = s;
     switch (caseConversionType) {
     case NONE:
add emptiness test to avoid nullpointer etc. errors in case of errors