Skip to content

Commit 81ec453

Browse files
committed
Merge branch 'master' into r2dbc-support
2 parents 8405cd0 + 674b308 commit 81ec453

Some content is hidden

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

47 files changed

+285
-276
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v4
1919
- name: Set up JDK ${{ matrix.java }} ${{ matrix.distribution }}
20-
uses: actions/setup-java@v3
20+
uses: actions/setup-java@v4
2121
with:
2222
java-version: ${{ matrix.java }}
2323
distribution: ${{ matrix.distribution }}

.github/workflows/coveralls.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v4
1111
- name: Set up JDK
12-
uses: actions/setup-java@v3
12+
uses: actions/setup-java@v4
1313
with:
1414
java-version: 21
1515
distribution: zulu

.github/workflows/site.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Site
2+
3+
on:
4+
push:
5+
branches:
6+
- site
7+
8+
jobs:
9+
build:
10+
if: github.repository_owner == 'mybatis' && ! contains(toJSON(github.event.head_commit.message), '[maven-release-plugin]')
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up JDK
15+
uses: actions/setup-java@v4
16+
with:
17+
java-version: 21
18+
distribution: zulu
19+
- uses: webfactory/ssh-agent@master
20+
with:
21+
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
22+
- name: Build site
23+
run: ./mvnw site site:stage -DskipTests -B -V --no-transfer-progress -Dlicense.skip=true
24+
env:
25+
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
- name: Deploy Site to gh-pages
28+
uses: JamesIves/[email protected]
29+
with:
30+
ssh-key: true
31+
branch: gh-pages
32+
folder: target/staging
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/sonar.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
# Disabling shallow clone is recommended for improving relevancy of reporting
1616
fetch-depth: 0
1717
- name: Set up JDK
18-
uses: actions/setup-java@v3
18+
uses: actions/setup-java@v4
1919
with:
2020
java-version: 21
2121
distribution: zulu

.github/workflows/sonatype.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v4
1414
- name: Set up JDK
15-
uses: actions/setup-java@v3
15+
uses: actions/setup-java@v4
1616
with:
1717
java-version: 21
1818
distribution: zulu

.mvn/wrapper/maven-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
1818
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar

pom.xml

Lines changed: 13 additions & 13 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>40</version>
23+
<version>41</version>
2424
</parent>
2525
<groupId>org.mybatis.dynamic-sql</groupId>
2626
<artifactId>mybatis-dynamic-sql</artifactId>
@@ -56,22 +56,22 @@
5656
<java.version>17</java.version>
5757
<java.release.version>8</java.release.version>
5858
<junit.jupiter.version>5.10.1</junit.jupiter.version>
59-
<spring.batch.version>5.0.3</spring.batch.version>
59+
<spring.batch.version>5.1.0</spring.batch.version>
6060

6161
<checkstyle.config>checkstyle-override.xml</checkstyle.config>
6262

6363
<clirr.comparisonVersion>1.5.0</clirr.comparisonVersion>
6464

6565
<module.name>org.mybatis.dynamic.sql</module.name>
6666

67-
<kotlin.version>1.9.20</kotlin.version>
67+
<kotlin.version>1.9.22</kotlin.version>
6868
<kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
6969

7070
<sonar.sources>pom.xml,src/main/java,src/main/kotlin</sonar.sources>
7171
<sonar.tests>src/test/java,src/test/kotlin</sonar.tests>
7272

7373
<kotlin.code.style>official</kotlin.code.style>
74-
<test.containers.version>1.19.2</test.containers.version>
74+
<test.containers.version>1.19.3</test.containers.version>
7575
<osgi.export>org.mybatis.dynamic.sql.*;version=${project.version};-noimport:=true</osgi.export>
7676

7777
<!-- Reproducible Builds -->
@@ -89,14 +89,14 @@
8989
<dependency>
9090
<groupId>org.springframework</groupId>
9191
<artifactId>spring-jdbc</artifactId>
92-
<version>6.0.14</version>
92+
<version>6.1.3</version>
9393
<scope>provided</scope>
9494
<optional>true</optional>
9595
</dependency>
9696
<dependency>
9797
<groupId>org.mybatis</groupId>
9898
<artifactId>mybatis</artifactId>
99-
<version>3.5.14</version>
99+
<version>3.5.15</version>
100100
<scope>provided</scope>
101101
<optional>true</optional>
102102
</dependency>
@@ -122,13 +122,13 @@
122122
<dependency>
123123
<groupId>org.assertj</groupId>
124124
<artifactId>assertj-core</artifactId>
125-
<version>3.24.2</version>
125+
<version>3.25.1</version>
126126
<scope>test</scope>
127127
</dependency>
128128
<dependency>
129129
<groupId>org.mybatis</groupId>
130130
<artifactId>mybatis-spring</artifactId>
131-
<version>3.0.2</version>
131+
<version>3.0.3</version>
132132
<scope>test</scope>
133133
</dependency>
134134
<dependency>
@@ -158,7 +158,7 @@
158158
<dependency>
159159
<groupId>ch.qos.logback</groupId>
160160
<artifactId>logback-classic</artifactId>
161-
<version>1.4.11</version>
161+
<version>1.4.14</version>
162162
<scope>test</scope>
163163
</dependency>
164164
<!-- Hamcrest is only here to make Infinitest happy. Not really used in the project. -->
@@ -184,7 +184,7 @@
184184
<dependency>
185185
<groupId>org.postgresql</groupId>
186186
<artifactId>postgresql</artifactId>
187-
<version>42.6.0</version>
187+
<version>42.7.1</version>
188188
<scope>test</scope>
189189
</dependency>
190190
<dependency>
@@ -196,7 +196,7 @@
196196
<dependency>
197197
<groupId>org.mariadb.jdbc</groupId>
198198
<artifactId>mariadb-java-client</artifactId>
199-
<version>3.3.0</version>
199+
<version>3.3.2</version>
200200
<scope>test</scope>
201201
</dependency>
202202

@@ -327,7 +327,7 @@
327327
</executions>
328328
</plugin>
329329
<plugin>
330-
<groupId>io.jsonwebtoken.coveralls</groupId>
330+
<groupId>com.github.hazendaz.maven</groupId>
331331
<artifactId>coveralls-maven-plugin</artifactId>
332332
<configuration>
333333
<sourceDirectories>src/main/java,src/main/kotlin</sourceDirectories>
@@ -337,7 +337,7 @@
337337
<plugin>
338338
<groupId>org.codehaus.mojo</groupId>
339339
<artifactId>build-helper-maven-plugin</artifactId>
340-
<version>3.4.0</version>
340+
<version>3.5.0</version>
341341
<executions>
342342
<execution>
343343
<goals>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ private SqlColumn(Builder<T> builder) {
4646
alias = builder.alias;
4747
typeHandler = builder.typeHandler;
4848
renderingStrategy = builder.renderingStrategy;
49-
parameterTypeConverter = builder.parameterTypeConverter;
49+
parameterTypeConverter = Objects.requireNonNull(builder.parameterTypeConverter);
5050
tableQualifier = builder.tableQualifier;
5151
javaType = builder.javaType;
5252
}
@@ -81,7 +81,7 @@ public Optional<Class<T>> javaType() {
8181

8282
@Override
8383
public Object convertParameterType(T value) {
84-
return parameterTypeConverter == null ? value : parameterTypeConverter.convert(value);
84+
return parameterTypeConverter.convert(value);
8585
}
8686

8787
@Override
@@ -110,7 +110,7 @@ public SqlColumn<T> qualifiedWith(String tableQualifier) {
110110
}
111111

112112
/**
113-
* Set an alias with a camel cased string based on the column name. The can be useful for queries using
113+
* Set an alias with a camel cased string based on the column name. This can be useful for queries using
114114
* the {@link org.mybatis.dynamic.sql.util.mybatis3.CommonSelectMapper} where the columns are placed into
115115
* a map based on the column name returned from the database.
116116
*
@@ -218,7 +218,7 @@ public static class Builder<T> {
218218
protected String alias;
219219
protected String typeHandler;
220220
protected RenderingStrategy renderingStrategy;
221-
protected ParameterTypeConverter<T, ?> parameterTypeConverter;
221+
protected ParameterTypeConverter<T, ?> parameterTypeConverter = v -> v;
222222
protected String tableQualifier;
223223
protected Class<T> javaType;
224224

src/main/java/org/mybatis/dynamic/sql/common/AbstractBooleanExpressionDSL.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
import org.mybatis.dynamic.sql.ExistsPredicate;
2929
import org.mybatis.dynamic.sql.SqlCriterion;
3030
import org.mybatis.dynamic.sql.VisitableCondition;
31-
import org.mybatis.dynamic.sql.exception.InvalidSqlException;
32-
import org.mybatis.dynamic.sql.util.Messages;
31+
import org.mybatis.dynamic.sql.util.Validator;
3332

3433
public abstract class AbstractBooleanExpressionDSL<T extends AbstractBooleanExpressionDSL<T>> {
3534
private SqlCriterion initialCriterion; // WARNING - may be null!
@@ -146,10 +145,7 @@ private void addSubCriteria(String connector, List<AndOrCriteriaGroup> criteria)
146145
}
147146

148147
protected void setInitialCriterion(SqlCriterion initialCriterion, StatementType statementType) {
149-
if (this.initialCriterion != null) {
150-
throw new InvalidSqlException(Messages.getString(statementType.messageNumber())); //$NON-NLS-1$
151-
}
152-
148+
Validator.assertTrue(this.initialCriterion == null, statementType.messageNumber());
153149
this.initialCriterion = initialCriterion;
154150
}
155151

src/main/java/org/mybatis/dynamic/sql/common/OrderByModel.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,14 @@
2323
import java.util.stream.Stream;
2424

2525
import org.mybatis.dynamic.sql.SortSpecification;
26-
import org.mybatis.dynamic.sql.exception.InvalidSqlException;
27-
import org.mybatis.dynamic.sql.util.Messages;
26+
import org.mybatis.dynamic.sql.util.Validator;
2827

2928
public class OrderByModel {
3029
private final List<SortSpecification> columns = new ArrayList<>();
3130

3231
private OrderByModel(Collection<? extends SortSpecification> columns) {
3332
Objects.requireNonNull(columns);
34-
if (columns.isEmpty()) {
35-
throw new InvalidSqlException(Messages.getString("ERROR.12")); //$NON-NLS-1$
36-
}
33+
Validator.assertNotEmpty(columns, "ERROR.12"); //$NON-NLS-1$
3734
this.columns.addAll(columns);
3835
}
3936

0 commit comments

Comments
 (0)