From 9f15086293b709f0886be4a342b00891904dd22b Mon Sep 17 00:00:00 2001 From: guanchengang <1620522809@qq.com> Date: Sat, 6 Sep 2025 08:56:38 +0800 Subject: [PATCH] typo --- .../org/apache/ibatis/annotations/CacheNamespace.java | 7 ++++--- .../org/apache/ibatis/annotations/ConstructorArgs.java | 10 +++++----- .../java/org/apache/ibatis/annotations/Select.java | 4 ++-- .../apache/ibatis/annotations/TypeDiscriminator.java | 10 +++++----- src/main/java/org/apache/ibatis/plugin/Intercepts.java | 6 +++--- .../org/apache/ibatis/type/SimpleTypeRegistry.java | 4 ++-- .../org/apache/ibatis/io/ExternalResourcesTest.java | 2 +- .../org/apache/ibatis/submitted/dynsql/Parameter.java | 4 ++-- .../org/apache/ibatis/submitted/dynsql2/Parameter.java | 4 ++-- .../extends_with_constructor/NpeExtendsTest.java | 4 ++-- .../submitted/overwritingproperties/FooMapperTest.java | 2 +- 11 files changed, 29 insertions(+), 28 deletions(-) diff --git a/src/main/java/org/apache/ibatis/annotations/CacheNamespace.java b/src/main/java/org/apache/ibatis/annotations/CacheNamespace.java index 5e5395d96ad..2720a966ab7 100644 --- a/src/main/java/org/apache/ibatis/annotations/CacheNamespace.java +++ b/src/main/java/org/apache/ibatis/annotations/CacheNamespace.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2024 the original author or authors. + * Copyright 2009-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,8 +32,9 @@ * *
{@code
* @CacheNamespace(implementation = CustomCache.class, properties = {
- * @Property(name = "host", value = "${mybatis.cache.host}"),
- * @Property(name = "port", value = "${mybatis.cache.port}"), @Property(name = "name", value = "usersCache") })
+ * @Property(name = "host", value = "${mybatis.cache.host}"),
+ * @Property(name = "port", value = "${mybatis.cache.port}"),
+ * @Property(name = "name", value = "usersCache") })
* public interface UserMapper {
* // ...
* }
diff --git a/src/main/java/org/apache/ibatis/annotations/ConstructorArgs.java b/src/main/java/org/apache/ibatis/annotations/ConstructorArgs.java
index 18df6650bdf..1b958bf97c2 100644
--- a/src/main/java/org/apache/ibatis/annotations/ConstructorArgs.java
+++ b/src/main/java/org/apache/ibatis/annotations/ConstructorArgs.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2009-2024 the original author or authors.
+ * Copyright 2009-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,10 +28,10 @@
*
* {@code
* public interface UserMapper {
- * @ConstructorArgs({ @Arg(column = "id", javaType = int.class, id = true),
- * @Arg(column = "name", javaType = String.class),
- * @Arg(javaType = UserEmail.class, select = "selectUserEmailById", column = "id") })
- * @Select("SELECT id, name FROM users WHERE id = #{id}")
+ * @ConstructorArgs(value = { @Arg(column = "id", javaType = int.class, id = true),
+ * @Arg(column = "name", javaType = String.class),
+ * @Arg(javaType = UserEmail.class, select = "selectUserEmailById", column = "id") })
+ * @Select("SELECT id, name FROM users WHERE id = #{id}")
* User selectById(int id);
* }
* }
diff --git a/src/main/java/org/apache/ibatis/annotations/Select.java b/src/main/java/org/apache/ibatis/annotations/Select.java
index 4236c636e50..b0ae32fbb21 100644
--- a/src/main/java/org/apache/ibatis/annotations/Select.java
+++ b/src/main/java/org/apache/ibatis/annotations/Select.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2009-2024 the original author or authors.
+ * Copyright 2009-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@
*
* {@code
* public interface UserMapper {
- * @Select({ "" })
* User select(@NotNull String name, @Nullable Integer age);
* }
diff --git a/src/main/java/org/apache/ibatis/annotations/TypeDiscriminator.java b/src/main/java/org/apache/ibatis/annotations/TypeDiscriminator.java
index 6f7eb9aab32..a2a7151957d 100644
--- a/src/main/java/org/apache/ibatis/annotations/TypeDiscriminator.java
+++ b/src/main/java/org/apache/ibatis/annotations/TypeDiscriminator.java
@@ -32,11 +32,11 @@
*
* {@code
* public interface UserMapper {
- * @Select("SELECT id, name, type FROM users ORDER BY id")
- * @TypeDiscriminator(column = "type", javaType = String.class, cases = {
- * @Case(value = "1", type = PremiumUser.class), @Case(value = "2", type = GeneralUser.class),
- * @Case(value = "3", type = TemporaryUser.class) })
- * List<User> selectAll();
+ * @Select("SELECT id, name, type FROM users ORDER BY id")
+ * @TypeDiscriminator(column = "type", javaType = String.class, cases = {
+ * @Case(value = "1", type = PremiumUser.class), @Case(value = "2", type = GeneralUser.class),
+ * @Case(value = "3", type = TemporaryUser.class) })
+ * List selectAll();
* }
* }
*
diff --git a/src/main/java/org/apache/ibatis/plugin/Intercepts.java b/src/main/java/org/apache/ibatis/plugin/Intercepts.java
index e7c23e91174..16863e0f864 100644
--- a/src/main/java/org/apache/ibatis/plugin/Intercepts.java
+++ b/src/main/java/org/apache/ibatis/plugin/Intercepts.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2009-2024 the original author or authors.
+ * Copyright 2009-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,9 +27,9 @@
* How to use:
*
* {@code
- * @Intercepts({ @Signature(type = Executor.class, method = "update", args = { MappedStatement.class, Object.class }) })
+ * @Intercepts(value = { @Signature(type = Executor.class, method = "update", args = { MappedStatement.class, Object.class }) })
* public class ExamplePlugin implements Interceptor {
- * @Override
+ * @Override
* public Object intercept(Invocation invocation) throws Throwable {
* // implement pre-processing if needed
* Object returnObject = invocation.proceed();
diff --git a/src/main/java/org/apache/ibatis/type/SimpleTypeRegistry.java b/src/main/java/org/apache/ibatis/type/SimpleTypeRegistry.java
index 4eecbe5a4e4..ab0d520ba0b 100644
--- a/src/main/java/org/apache/ibatis/type/SimpleTypeRegistry.java
+++ b/src/main/java/org/apache/ibatis/type/SimpleTypeRegistry.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2009-2023 the original author or authors.
+ * Copyright 2009-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -48,7 +48,7 @@ private SimpleTypeRegistry() {
// Prevent Instantiation
}
- /*
+ /**
* Tells us if the class passed in is a known common type
* @param clazz The class to check
* @return True if the class is known
diff --git a/src/test/java/org/apache/ibatis/io/ExternalResourcesTest.java b/src/test/java/org/apache/ibatis/io/ExternalResourcesTest.java
index abb1b165ecb..4fb6aae8e6f 100644
--- a/src/test/java/org/apache/ibatis/io/ExternalResourcesTest.java
+++ b/src/test/java/org/apache/ibatis/io/ExternalResourcesTest.java
@@ -39,7 +39,7 @@ class ExternalResourcesTest {
private File badFile;
private File tempFile;
- /*
+ /**
* @throws java.lang.Exception
*/
@BeforeEach
diff --git a/src/test/java/org/apache/ibatis/submitted/dynsql/Parameter.java b/src/test/java/org/apache/ibatis/submitted/dynsql/Parameter.java
index 513237a41f0..c8b6067e1a2 100644
--- a/src/test/java/org/apache/ibatis/submitted/dynsql/Parameter.java
+++ b/src/test/java/org/apache/ibatis/submitted/dynsql/Parameter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2009-2022 the original author or authors.
+ * Copyright 2009-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
import java.util.List;
-/*
+/**
* @author Jeff Butler
*/
public class Parameter {
diff --git a/src/test/java/org/apache/ibatis/submitted/dynsql2/Parameter.java b/src/test/java/org/apache/ibatis/submitted/dynsql2/Parameter.java
index beae79663c8..b84bafba346 100644
--- a/src/test/java/org/apache/ibatis/submitted/dynsql2/Parameter.java
+++ b/src/test/java/org/apache/ibatis/submitted/dynsql2/Parameter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2009-2022 the original author or authors.
+ * Copyright 2009-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
import java.util.List;
-/*
+/**
* @author Jeff Butler
*/
public class Parameter {
diff --git a/src/test/java/org/apache/ibatis/submitted/extends_with_constructor/NpeExtendsTest.java b/src/test/java/org/apache/ibatis/submitted/extends_with_constructor/NpeExtendsTest.java
index 5c65d7282e0..d5ae6a9922d 100644
--- a/src/test/java/org/apache/ibatis/submitted/extends_with_constructor/NpeExtendsTest.java
+++ b/src/test/java/org/apache/ibatis/submitted/extends_with_constructor/NpeExtendsTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2009-2024 the original author or authors.
+ * Copyright 2009-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
-/*
+/**
* Test for NPE when using extends.
*
* @author poitrac
diff --git a/src/test/java/org/apache/ibatis/submitted/overwritingproperties/FooMapperTest.java b/src/test/java/org/apache/ibatis/submitted/overwritingproperties/FooMapperTest.java
index e899ff7becc..1ede7d5de2e 100644
--- a/src/test/java/org/apache/ibatis/submitted/overwritingproperties/FooMapperTest.java
+++ b/src/test/java/org/apache/ibatis/submitted/overwritingproperties/FooMapperTest.java
@@ -28,7 +28,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-/*
+/**
* @author jjensen
*/
class FooMapperTest {