Skip to content

Commit ac8e220

Browse files
committed
alternatives to pr#3523
1 parent 161a0b7 commit ac8e220

File tree

11 files changed

+42
-34
lines changed

11 files changed

+42
-34
lines changed

src/main/java/org/apache/ibatis/annotations/CacheNamespace.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,16 @@
3030
* <p>
3131
* <b>How to use:</b>
3232
*
33-
* <pre>{@code
34-
* @CacheNamespace(implementation = CustomCache.class, properties = {
35-
* &#064;Property(name = "host", value = "${mybatis.cache.host}"),
36-
* &#064;Property(name = "port", value = "${mybatis.cache.port}"), &#064;Property(name = "name", value = "usersCache") })
33+
* <pre>
34+
* <code>&#064;CacheNamespace(implementation = CustomCache.class, properties = {
35+
* &#064;Property(name = "host", value = "${mybatis.cache.host}"),
36+
* &#064;Property(name = "port", value = "${mybatis.cache.port}"),
37+
* &#064;Property(name = "name", value = "usersCache") })
3738
* public interface UserMapper {
3839
* // ...
3940
* }
40-
* }</pre>
41+
* </code>
42+
* </pre>
4143
*
4244
* @author Clinton Begin
4345
* @author Kazuki Shimizu

src/main/java/org/apache/ibatis/annotations/ConstructorArgs.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,16 @@
2626
* <p>
2727
* <b>How to use:</b>
2828
*
29-
* <pre>{@code
30-
* public interface UserMapper {
31-
* @ConstructorArgs({ &#064;Arg(column = "id", javaType = int.class, id = true),
32-
* &#064;Arg(column = "name", javaType = String.class),
33-
* &#064;Arg(javaType = UserEmail.class, select = "selectUserEmailById", column = "id") })
29+
* <pre>
30+
* <code>public interface UserMapper {
31+
* &#064;ConstructorArgs({ &#064;Arg(column = "id", javaType = int.class, id = true),
32+
* &#064;Arg(column = "name", javaType = String.class),
33+
* &#064;Arg(javaType = UserEmail.class, select = "selectUserEmailById", column = "id") })
3434
* &#064;Select("SELECT id, name FROM users WHERE id = #{id}")
3535
* User selectById(int id);
3636
* }
37-
* }</pre>
37+
* </code>
38+
* </pre>
3839
*
3940
* @author Clinton Begin
4041
*/

src/main/java/org/apache/ibatis/annotations/Select.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,25 @@
2929
* <ul>
3030
* <li>Simple:
3131
*
32-
* <pre>{@code
33-
* public interface UserMapper {
34-
* @Select("SELECT id, name FROM users WHERE id = #{id}")
32+
* <pre>
33+
* <code>public interface UserMapper {
34+
* &#064;Select("SELECT id, name FROM users WHERE id = #{id}")
3535
* User selectById(int id);
3636
* }
37-
* }</pre>
37+
* </code>
38+
* </pre>
3839
*
3940
* </li>
4041
* <li>Dynamic SQL:
4142
*
42-
* <pre>{@code
43-
* public interface UserMapper {
44-
* @Select({ "<script>", "select * from users", "where name = #{name}",
45-
* "<if test=\"age != null\"> age = #{age} </if>", "</script>" })
43+
* <pre>
44+
* <code>public interface UserMapper {
45+
* &#064;Select({ "&lt;script&gt;", "select * from users", "where name = #{name}",
46+
* "&lt;if test=\"age != null\"&gt; age = #{age} &lt;/if&gt;", "&lt;/script&gt;" })
4647
* User select(@NotNull String name, @Nullable Integer age);
4748
* }
48-
* }</pre>
49+
* </code>
50+
* </pre>
4951
*
5052
* </li>
5153
* </ul>

src/main/java/org/apache/ibatis/annotations/TypeDiscriminator.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,17 @@
3030
* <p>
3131
* <b>How to use:</b>
3232
*
33-
* <pre>{@code
34-
* public interface UserMapper {
33+
* <pre>
34+
* <code>public interface UserMapper {
3535
* &#064;Select("SELECT id, name, type FROM users ORDER BY id")
3636
* &#064;TypeDiscriminator(column = "type", javaType = String.class, cases = {
37-
* &#064;Case(value = "1", type = PremiumUser.class), &#064;Case(value = "2", type = GeneralUser.class),
38-
* &#064;Case(value = "3", type = TemporaryUser.class) })
37+
* &#064;Case(value = "1", type = PremiumUser.class),
38+
* &#064;Case(value = "2", type = GeneralUser.class),
39+
* &#064;Case(value = "3", type = TemporaryUser.class) })
3940
* List&lt;User&gt; selectAll();
4041
* }
41-
* }</pre>
42+
* </code>
43+
* </pre>
4244
*
4345
* @author Clinton Begin
4446
*/

src/main/java/org/apache/ibatis/plugin/Intercepts.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
* <p>
2727
* <b>How to use:</b>
2828
*
29-
* <pre>{@code
30-
* @Intercepts({ &#064;Signature(type = Executor.class, method = "update", args = { MappedStatement.class, Object.class }) })
29+
* <pre>
30+
* <code>&#064;Intercepts({ &#064;Signature(type = Executor.class, method = "update", args = { MappedStatement.class, Object.class }) })
3131
* public class ExamplePlugin implements Interceptor {
3232
* &#064;Override
3333
* public Object intercept(Invocation invocation) throws Throwable {
@@ -37,7 +37,8 @@
3737
* return returnObject;
3838
* }
3939
* }
40-
* }</pre>
40+
* </code>
41+
* </pre>
4142
*
4243
* @author Clinton Begin
4344
*/

src/main/java/org/apache/ibatis/type/SimpleTypeRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private SimpleTypeRegistry() {
4848
// Prevent Instantiation
4949
}
5050

51-
/*
51+
/**
5252
* Tells us if the class passed in is a known common type
5353
* @param clazz The class to check
5454
* @return True if the class is known

src/test/java/org/apache/ibatis/io/ExternalResourcesTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class ExternalResourcesTest {
3939
private File badFile;
4040
private File tempFile;
4141

42-
/*
42+
/**
4343
* @throws java.lang.Exception
4444
*/
4545
@BeforeEach

src/test/java/org/apache/ibatis/submitted/dynsql/Parameter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import java.util.List;
1919

20-
/*
20+
/**
2121
* @author Jeff Butler
2222
*/
2323
public class Parameter {

src/test/java/org/apache/ibatis/submitted/dynsql2/Parameter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import java.util.List;
1919

20-
/*
20+
/**
2121
* @author Jeff Butler
2222
*/
2323
public class Parameter {

src/test/java/org/apache/ibatis/submitted/extends_with_constructor/NpeExtendsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import org.junit.jupiter.api.BeforeAll;
3434
import org.junit.jupiter.api.Test;
3535

36-
/*
36+
/**
3737
* Test for NPE when using extends.
3838
*
3939
* @author poitrac

0 commit comments

Comments
 (0)