This commit is contained in:
RedKale
2016-06-01 12:33:23 +08:00
parent b4a40eef8b
commit 4547e438c8
2 changed files with 2 additions and 2 deletions

View File

@@ -424,7 +424,7 @@ public final class EntityCache<T> {
//-------------------------------------------------------------------------------------------------------------------------------
protected Comparator<T> createComparator(Flipper flipper) {
if (flipper == null || flipper.getSort() == null || flipper.getSort().isEmpty()) return null;
if (flipper == null || flipper.getSort() == null || flipper.getSort().isEmpty() || flipper.getSort().indexOf(';') >= 0 || flipper.getSort().indexOf('\n') >= 0) return null;
final String sort = flipper.getSort();
Comparator<T> comparator = this.sortComparators.get(sort);
if (comparator != null) return comparator;

View File

@@ -312,7 +312,7 @@ public final class EntityInfo<T> {
}
protected String createSQLOrderby(Flipper flipper) {
if (flipper == null || flipper.getSort() == null || flipper.getSort().isEmpty()) return "";
if (flipper == null || flipper.getSort() == null || flipper.getSort().isEmpty() || flipper.getSort().indexOf(';') >= 0 || flipper.getSort().indexOf('\n') >= 0 ) return "";
final String sort = flipper.getSort();
String sql = this.sortOrderbySqls.get(sort);
if (sql != null) return sql;