Skip to content

Checkstyle and Spotbugs Updates #359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public String insertMultipleWithGeneratedKeys(Map<String, Object> parameterMap)
if (entries.size() == 1) {
return entries.get(0);
} else {
throw new IllegalArgumentException("The parameters for insertMultipleWithGeneratedKeys" + //$NON-NLS-1$
" must contain exactly one parameter of type String"); //$NON-NLS-1$
throw new IllegalArgumentException("The parameters for insertMultipleWithGeneratedKeys" //$NON-NLS-1$
+ " must contain exactly one parameter of type String"); //$NON-NLS-1$
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ protected IsInCaseInsensitive(Collection<String> values, Callback emptyCallback

@Override
public String renderCondition(String columnName, Stream<String> placeholders) {
return "upper(" + columnName + ") " + //$NON-NLS-1$ //$NON-NLS-2$
placeholders.collect(Collectors.joining(",", "in (", ")")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
return "upper(" + columnName + ") " //$NON-NLS-1$ //$NON-NLS-2$
+ placeholders.collect(
Collectors.joining(",", "in (", ")")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ protected IsNotInCaseInsensitive(Collection<String> values, Callback emptyCallba

@Override
public String renderCondition(String columnName, Stream<String> placeholders) {
return "upper(" + columnName + ") " + //$NON-NLS-1$ //$NON-NLS-2$
placeholders.collect(
return "upper(" + columnName + ") " //$NON-NLS-1$ //$NON-NLS-2$
+ placeholders.collect(
Collectors.joining(",", "not in (", ")")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,18 @@ abstract class KotlinBaseBuilder<D : AbstractWhereSupport<*>, B : KotlinBaseBuil

fun allRows(): B = self()

private fun applyToWhere(block: AbstractWhereDSL<*>.() -> Unit): B =
self().also {
getDsl().where().apply(block)
}
private fun applyToWhere(block: AbstractWhereDSL<*>.() -> Unit): B {
getDsl().where().apply(block)
return self()
}

private fun applyToWhere(
subCriteria: CriteriaReceiver,
block: AbstractWhereDSL<*>.(List<SqlCriterion>) -> Unit
): B =
self().also {
getDsl().where().block(CriteriaCollector().apply(subCriteria).criteria)
}
): B {
getDsl().where().block(CriteriaCollector().apply(subCriteria).criteria)
return self()
}

protected abstract fun self(): B

Expand Down Expand Up @@ -199,17 +199,17 @@ abstract class KotlinBaseJoiningBuilder<D : AbstractQueryExpressionDSL<*, *>, B
rightJoin(sq, sq.correlationName, jc.onJoinCriterion, jc.andJoinCriteria)
}

private fun applyToDsl(joinCriteria: JoinReceiver, applyJoin: D.(JoinCollector) -> Unit): B =
self().also {
getDsl().applyJoin(JoinCollector().apply(joinCriteria))
}
private fun applyToDsl(joinCriteria: JoinReceiver, applyJoin: D.(JoinCollector) -> Unit): B {
getDsl().applyJoin(JoinCollector().apply(joinCriteria))
return self()
}

private fun applyToDsl(
subQuery: KotlinQualifiedSubQueryBuilder.() -> Unit,
joinCriteria: JoinReceiver,
applyJoin: D.(KotlinQualifiedSubQueryBuilder, JoinCollector) -> Unit
): B =
self().also {
getDsl().applyJoin(KotlinQualifiedSubQueryBuilder().apply(subQuery), JoinCollector().apply(joinCriteria))
}
): B {
getDsl().applyJoin(KotlinQualifiedSubQueryBuilder().apply(subQuery), JoinCollector().apply(joinCriteria))
return self()
}
}