bug fix: error java.util.regex.Pattern cannot be cast to java.lang.Comparable
when compiling using jdk 7.