Skip to content

Commit 86e5c46

Browse files
committed
Merge branch 'develop'
2 parents 20134f2 + 34ded0c commit 86e5c46

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/main/java/info/unterrainer/commons/httpserver/GenericHandlerGroup.java

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ private void getList(final Context ctx) {
123123
.joinClause("")
124124
.whereClause("")
125125
.params(null)
126+
.orderByClause("")
126127
.partOfQueryString("")
127128
.build();
128129
for (GetListInterceptor interceptor : getListInterceptors)

src/main/java/info/unterrainer/commons/httpserver/interceptors/InterceptorParamBuilder.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,12 @@ public InterceptorParamBuilder<P, J, E> join(final String joinClause) {
5151
/**
5252
* Here you can specify a special order-by-clause that will be appended to your
5353
* SQL-query later on.
54-
* <p>
55-
* May or may not start with 'order by', your choice.
5654
*
5755
* @param orderByClause the clause (Example: {@code 'o.name DESC'}
5856
* @return itself in order to provide a fluent interface.
5957
*/
6058
public InterceptorParamBuilder<P, J, E> orderBy(final String orderByClause) {
61-
this.orderByClause = orderByClause.trim().toLowerCase().startsWith("order by") ? " " + orderByClause.trim()
62-
: " ORDER BY " + orderByClause.trim();
59+
this.orderByClause = " " + orderByClause.trim();
6360
return this;
6461
}
6562

0 commit comments

Comments
 (0)