Skip to content

Commit 3ffc250

Browse files
committed
Null Marking
1 parent 5013d44 commit 3ffc250

File tree

5 files changed

+23
-9
lines changed

5 files changed

+23
-9
lines changed

src/test/java/examples/mysql/IsLikeEscape.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@
1919
import java.util.function.Function;
2020
import java.util.function.Predicate;
2121

22-
import org.jspecify.annotations.NullMarked;
2322
import org.jspecify.annotations.Nullable;
2423
import org.mybatis.dynamic.sql.AbstractSingleValueCondition;
2524
import org.mybatis.dynamic.sql.BindableColumn;
2625
import org.mybatis.dynamic.sql.render.RenderingContext;
2726
import org.mybatis.dynamic.sql.util.FragmentAndParameters;
2827

29-
@NullMarked
3028
public class IsLikeEscape<T> extends AbstractSingleValueCondition<T>
3129
implements AbstractSingleValueCondition.Filterable<T>, AbstractSingleValueCondition.Mappable<T> {
3230
private static final IsLikeEscape<?> EMPTY = new IsLikeEscape<Object>(-1, null) {

src/test/java/examples/mysql/MemberOfCondition.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@
1717

1818
import java.util.Objects;
1919

20-
import org.jspecify.annotations.NullMarked;
2120
import org.mybatis.dynamic.sql.AbstractNoValueCondition;
2221

23-
@NullMarked
2422
public class MemberOfCondition<T> extends AbstractNoValueCondition<T> {
2523
private final String jsonArray;
2624

src/test/java/examples/mysql/MemberOfFunction.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,12 @@
1717

1818
import java.util.Objects;
1919

20-
import org.jspecify.annotations.NullMarked;
2120
import org.mybatis.dynamic.sql.BasicColumn;
2221
import org.mybatis.dynamic.sql.BindableColumn;
2322
import org.mybatis.dynamic.sql.render.RenderingContext;
2423
import org.mybatis.dynamic.sql.select.function.AbstractTypeConvertingFunction;
2524
import org.mybatis.dynamic.sql.util.FragmentAndParameters;
2625

27-
@NullMarked
2826
public class MemberOfFunction<T> extends AbstractTypeConvertingFunction<T, Long, MemberOfFunction<T>> {
2927

3028
private final String jsonArray;

src/test/java/examples/mysql/MySQLTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
3535
import org.apache.ibatis.transaction.jdbc.JdbcTransactionFactory;
3636
import org.junit.jupiter.api.BeforeAll;
37+
import org.junit.jupiter.api.BeforeEach;
3738
import org.junit.jupiter.api.Test;
3839
import org.mybatis.dynamic.sql.render.RenderingStrategies;
3940
import org.mybatis.dynamic.sql.select.render.SelectStatementProvider;
@@ -51,10 +52,10 @@ class MySQLTest {
5152
new MySQLContainer<>(TestContainersConfiguration.MYSQL_LATEST)
5253
.withInitScript("examples/mariadb/CreateDB.sql");
5354

54-
private static SqlSessionFactory sqlSessionFactory;
55+
private SqlSessionFactory sqlSessionFactory;
5556

56-
@BeforeAll
57-
static void setup() {
57+
@BeforeEach
58+
void setup() {
5859
UnpooledDataSource ds = new UnpooledDataSource(mysql.getDriverClassName(), mysql.getJdbcUrl(),
5960
mysql.getUsername(), mysql.getPassword());
6061
Environment environment = new Environment("test", new JdbcTransactionFactory(), ds);
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright 2016-2025 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
@NullMarked
17+
package examples.mysql;
18+
19+
import org.jspecify.annotations.NullMarked;

0 commit comments

Comments
 (0)