Skip to content

Commit e9e465c

Browse files
authored
Merge pull request #261 from jeffgbutler/update-parent
Update Parent and Fix Resulting Issues
2 parents ecf8142 + 222775b commit e9e465c

File tree

270 files changed

+3401
-3401
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

270 files changed

+3401
-3401
lines changed

checkstyle-override.xml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<!--
33
4-
Copyright 2016-2018 the original author or authors.
4+
Copyright 2016-2020 the original author or authors.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.
@@ -44,6 +44,11 @@
4444
<property name="eachLine" value="true"/>
4545
</module>
4646

47+
<module name="LineLength">
48+
<property name="max" value="120"/>
49+
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
50+
</module>
51+
4752
<module name="TreeWalker">
4853
<module name="OuterTypeFilename"/>
4954
<module name="IllegalTokenText">
@@ -56,10 +61,6 @@
5661
<property name="allowByTailComment" value="true"/>
5762
<property name="allowNonPrintableEscapes" value="true"/>
5863
</module>
59-
<module name="LineLength">
60-
<property name="max" value="120"/>
61-
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
62-
</module>
6364
<module name="AvoidStarImport"/>
6465
<module name="OneTopLevelClass"/>
6566
<module name="NoLineWrap"/>
@@ -75,7 +76,7 @@
7576
</module>
7677
<module name="RightCurly">
7778
<property name="id" value="RightCurlyAlone"/>
78-
<property name="option" value="alone"/>
79+
<property name="option" value="alone_or_singleline"/>
7980
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT, INSTANCE_INIT"/>
8081
</module>
8182
<module name="WhitespaceAround">
@@ -187,7 +188,7 @@
187188
<module name="CustomImportOrder">
188189
<property name="sortImportsInGroupAlphabetically" value="true"/>
189190
<property name="separateLineBetweenGroups" value="true"/>
190-
<property name="customImportOrderRules" value="STATIC###THIRD_PARTY_PACKAGE"/>
191+
<property name="customImportOrderRules" value="STATIC###STANDARD_JAVA_PACKAGE###THIRD_PARTY_PACKAGE"/>
191192
</module>
192193
<module name="MethodParamPad"/>
193194
<module name="ParenPad"/>
@@ -217,12 +218,8 @@
217218
<module name="JavadocMethod">
218219
<property name="scope" value="public"/>
219220
<property name="allowMissingParamTags" value="true"/>
220-
<property name="allowMissingThrowsTags" value="true"/>
221221
<property name="allowMissingReturnTag" value="true"/>
222-
<property name="allowMissingJavadoc" value="true"/>
223-
<property name="minLineCount" value="2"/>
224222
<property name="allowedAnnotations" value="Override, Test"/>
225-
<property name="allowThrowsTagsForSubclasses" value="true"/>
226223
</module>
227224
<module name="MethodName">
228225
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>

pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<groupId>org.mybatis</groupId>
2222
<artifactId>mybatis-parent</artifactId>
23-
<version>31</version>
23+
<version>32</version>
2424
</parent>
2525
<groupId>org.mybatis.dynamic-sql</groupId>
2626
<artifactId>mybatis-dynamic-sql</artifactId>
@@ -42,7 +42,6 @@
4242
<kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
4343
<sonar.sources>pom.xml,src/main/java,src/main/kotlin</sonar.sources>
4444
<sonar.tests>src/test/java,src/test/kotlin</sonar.tests>
45-
<jacoco.version>0.8.5</jacoco.version>
4645
<kotlin.code.style>official</kotlin.code.style>
4746
<test.containers.version>1.14.3</test.containers.version>
4847
<osgi.export>org.mybatis.dynamic.sql.*;version=${project.version};-noimport:=true</osgi.export>

src/main/java/org/mybatis/dynamic/sql/AbstractColumnComparisonCondition.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
public abstract class AbstractColumnComparisonCondition<T> implements VisitableCondition<T> {
2121

2222
protected final BasicColumn column;
23-
23+
2424
protected AbstractColumnComparisonCondition(BasicColumn column) {
2525
this.column = column;
2626
}
@@ -29,10 +29,10 @@ protected AbstractColumnComparisonCondition(BasicColumn column) {
2929
public <R> R accept(ConditionVisitor<T,R> visitor) {
3030
return visitor.visit(this);
3131
}
32-
32+
3333
public String renderCondition(String columnName, TableAliasCalculator tableAliasCalculator) {
3434
return renderCondition(columnName, column.renderWithTableAlias(tableAliasCalculator));
3535
}
36-
36+
3737
protected abstract String renderCondition(String leftColumn, String rightColumn);
3838
}

src/main/java/org/mybatis/dynamic/sql/AbstractListValueCondition.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ protected AbstractListValueCondition(Collection<T> values, UnaryOperator<Stream<
4343
.collect(Collectors.toList());
4444
this.emptyCallback = Objects.requireNonNull(emptyCallback);
4545
}
46-
46+
4747
public final <R> Stream<R> mapValues(Function<T, R> mapper) {
4848
return values.stream().map(mapper);
4949
}
50-
50+
5151
@Override
5252
public boolean shouldRender() {
5353
if (values.isEmpty()) {

src/main/java/org/mybatis/dynamic/sql/AbstractNoValueCondition.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,24 @@
2121
public abstract class AbstractNoValueCondition<T> implements VisitableCondition<T> {
2222

2323
private final BooleanSupplier booleanSupplier;
24-
24+
2525
protected AbstractNoValueCondition() {
2626
booleanSupplier = () -> true;
2727
}
28-
28+
2929
protected AbstractNoValueCondition(BooleanSupplier booleanSupplier) {
3030
this.booleanSupplier = Objects.requireNonNull(booleanSupplier);
3131
}
32-
32+
3333
@Override
3434
public boolean shouldRender() {
3535
return booleanSupplier.getAsBoolean();
3636
}
37-
37+
3838
@Override
3939
public <R> R accept(ConditionVisitor<T,R> visitor) {
4040
return visitor.visit(this);
4141
}
42-
42+
4343
public abstract String renderCondition(String columnName);
4444
}

src/main/java/org/mybatis/dynamic/sql/AbstractSingleValueCondition.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,30 @@
2222
public abstract class AbstractSingleValueCondition<T> implements VisitableCondition<T> {
2323
protected final Supplier<T> valueSupplier;
2424
private final Predicate<T> predicate;
25-
25+
2626
protected AbstractSingleValueCondition(Supplier<T> valueSupplier) {
2727
this.valueSupplier = Objects.requireNonNull(valueSupplier);
2828
predicate = v -> true;
2929
}
30-
30+
3131
protected AbstractSingleValueCondition(Supplier<T> valueSupplier, Predicate<T> predicate) {
3232
this.valueSupplier = Objects.requireNonNull(valueSupplier);
3333
this.predicate = Objects.requireNonNull(predicate);
3434
}
35-
35+
3636
public T value() {
3737
return valueSupplier.get();
3838
}
39-
39+
4040
@Override
4141
public boolean shouldRender() {
4242
return predicate.test(value());
4343
}
44-
44+
4545
@Override
4646
public <R> R accept(ConditionVisitor<T,R> visitor) {
4747
return visitor.visit(this);
4848
}
49-
49+
5050
public abstract String renderCondition(String columnName, String placeholder);
5151
}

src/main/java/org/mybatis/dynamic/sql/AbstractSubselectCondition.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020

2121
public abstract class AbstractSubselectCondition<T> implements VisitableCondition<T> {
2222
private final SelectModel selectModel;
23-
23+
2424
protected AbstractSubselectCondition(Buildable<SelectModel> selectModelBuilder) {
2525
this.selectModel = selectModelBuilder.build();
2626
}
27-
27+
2828
public SelectModel selectModel() {
2929
return selectModel;
3030
}

src/main/java/org/mybatis/dynamic/sql/AbstractTwoValueCondition.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public abstract class AbstractTwoValueCondition<T> implements VisitableCondition
2323
protected final Supplier<T> valueSupplier1;
2424
protected final Supplier<T> valueSupplier2;
2525
private final BiPredicate<T, T> predicate;
26-
26+
2727
protected AbstractTwoValueCondition(Supplier<T> valueSupplier1, Supplier<T> valueSupplier2) {
2828
this.valueSupplier1 = Objects.requireNonNull(valueSupplier1);
2929
this.valueSupplier2 = Objects.requireNonNull(valueSupplier2);
@@ -44,12 +44,12 @@ public T value1() {
4444
public T value2() {
4545
return valueSupplier2.get();
4646
}
47-
47+
4848
@Override
4949
public boolean shouldRender() {
5050
return predicate.test(value1(), value2());
5151
}
52-
52+
5353
@Override
5454
public <R> R accept(ConditionVisitor<T,R> visitor) {
5555
return visitor.visit(this);

src/main/java/org/mybatis/dynamic/sql/BasicColumn.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,54 +23,54 @@
2323
* Describes attributes of columns that are necessary for rendering if the column is not expected to
2424
* be bound as a JDBC parameter. Columns in select lists, join expressions, and group by expressions
2525
* are typically not bound.
26-
*
26+
*
2727
* @author Jeff Butler
2828
*
2929
*/
3030
public interface BasicColumn {
3131

3232
/**
3333
* Returns the columns alias if one has been specified.
34-
*
34+
*
3535
* @return the column alias
3636
*/
3737
Optional<String> alias();
38-
38+
3939
/**
4040
* Returns a new instance of a BasicColumn with the alias set.
41-
*
41+
*
4242
* @param alias the column alias to set
4343
* @return new instance with alias set
4444
*/
4545
BasicColumn as(String alias);
46-
46+
4747
/**
4848
* Returns the name of the item aliased with a table name if appropriate.
4949
* For example, "a.foo". This is appropriate for where clauses and order by clauses.
50-
*
50+
*
5151
* @param tableAliasCalculator the table alias calculator for the current renderer
5252
* @return the item name with the table alias applied
5353
*/
5454
String renderWithTableAlias(TableAliasCalculator tableAliasCalculator);
55-
55+
5656
/**
5757
* Returns the name of the item aliased with a table name and column alias if appropriate.
5858
* For example, "a.foo as bar". This is appropriate for select list clauses.
59-
*
59+
*
6060
* @param tableAliasCalculator the table alias calculator for the current renderer
6161
* @return the item name with the table and column aliases applied
6262
*/
6363
default String renderWithTableAndColumnAlias(TableAliasCalculator tableAliasCalculator) {
6464
String nameAndTableAlias = renderWithTableAlias(tableAliasCalculator);
65-
65+
6666
return alias().map(a -> nameAndTableAlias + " as " + a) //$NON-NLS-1$
6767
.orElse(nameAndTableAlias);
6868
}
69-
69+
7070
/**
7171
* Utility method to make it easier to build column lists for methods that require an
7272
* array rather than the varargs method.
73-
*
73+
*
7474
* @param columns list of BasicColumn
7575
* @return an array of BasicColumn
7676
*/

src/main/java/org/mybatis/dynamic/sql/BindableColumn.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,31 @@
2323
/**
2424
* Describes additional attributes of columns that are necessary for binding the column as a JDBC parameter.
2525
* Columns in where clauses are typically bound.
26-
*
26+
*
2727
* @author Jeff Butler
2828
*
2929
* @param <T> - the Java type that corresponds to this column
3030
*/
3131
public interface BindableColumn<T> extends BasicColumn {
3232

3333
/**
34-
* Override the base method definition to make it more specific to this interface.
34+
* Override the base method definition to make it more specific to this interface.
3535
*/
3636
@Override
3737
BindableColumn<T> as(String alias);
3838

3939
default Optional<JDBCType> jdbcType() {
4040
return Optional.empty();
4141
}
42-
42+
4343
default Optional<String> typeHandler() {
4444
return Optional.empty();
4545
}
46-
46+
4747
default Optional<RenderingStrategy> renderingStrategy() {
4848
return Optional.empty();
4949
}
50-
50+
5151
default Object convertParameterType(T value) {
5252
return value;
5353
}

0 commit comments

Comments
 (0)