Skip to content

Commit b070381

Browse files
authored
Merge pull request #2793 from hazendaz/formatting
[ci] formatting
2 parents 8c563b3 + cc2f0a7 commit b070381

File tree

98 files changed

+1031
-891
lines changed

Some content is hidden

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

98 files changed

+1031
-891
lines changed

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

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2022 the original author or authors.
2+
* Copyright 2009-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,28 +26,24 @@
2626
public class LongTypeHandler extends BaseTypeHandler<Long> {
2727

2828
@Override
29-
public void setNonNullParameter(PreparedStatement ps, int i, Long parameter, JdbcType jdbcType)
30-
throws SQLException {
29+
public void setNonNullParameter(PreparedStatement ps, int i, Long parameter, JdbcType jdbcType) throws SQLException {
3130
ps.setLong(i, parameter);
3231
}
3332

3433
@Override
35-
public Long getNullableResult(ResultSet rs, String columnName)
36-
throws SQLException {
34+
public Long getNullableResult(ResultSet rs, String columnName) throws SQLException {
3735
long result = rs.getLong(columnName);
3836
return result == 0 && rs.wasNull() ? null : result;
3937
}
4038

4139
@Override
42-
public Long getNullableResult(ResultSet rs, int columnIndex)
43-
throws SQLException {
40+
public Long getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
4441
long result = rs.getLong(columnIndex);
4542
return result == 0 && rs.wasNull() ? null : result;
4643
}
4744

4845
@Override
49-
public Long getNullableResult(CallableStatement cs, int columnIndex)
50-
throws SQLException {
46+
public Long getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
5147
long result = cs.getLong(columnIndex);
5248
return result == 0 && cs.wasNull() ? null : result;
5349
}

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2022 the original author or authors.
2+
* Copyright 2009-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,15 +23,16 @@
2323

2424
/**
2525
* The annotation that specify jdbc types to map {@link TypeHandler}.
26-
*
2726
* <p>
2827
* <b>How to use:</b>
28+
*
2929
* <pre>
30-
* &#064;MappedJdbcTypes({JdbcType.CHAR, JdbcType.VARCHAR})
30+
* &#064;MappedJdbcTypes({ JdbcType.CHAR, JdbcType.VARCHAR })
3131
* public class StringTrimmingTypeHandler implements TypeHandler&lt;String&gt; {
3232
* // ...
3333
* }
3434
* </pre>
35+
*
3536
* @author Eduardo Macarron
3637
*/
3738
@Documented

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2022 the original author or authors.
2+
* Copyright 2009-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,15 +23,16 @@
2323

2424
/**
2525
* The annotation that specify java types to map {@link TypeHandler}.
26-
*
2726
* <p>
2827
* <b>How to use:</b>
28+
*
2929
* <pre>
3030
* &#064;MappedTypes(String.class)
3131
* public class StringTrimmingTypeHandler implements TypeHandler&lt;String&gt; {
3232
* // ...
3333
* }
3434
* </pre>
35+
*
3536
* @author Eduardo Macarron
3637
*/
3738
@Documented

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2022 the original author or authors.
2+
* Copyright 2009-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,8 +22,8 @@
2222
import java.time.Month;
2323

2424
/**
25-
*
2625
* @since 3.4.5
26+
*
2727
* @author Björn Raupach
2828
*/
2929
public class MonthTypeHandler extends BaseTypeHandler<Month> {

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2022 the original author or authors.
2+
* Copyright 2009-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -35,22 +35,19 @@ public void setNonNullParameter(PreparedStatement ps, int i, String parameter, J
3535
}
3636

3737
@Override
38-
public String getNullableResult(ResultSet rs, String columnName)
39-
throws SQLException {
38+
public String getNullableResult(ResultSet rs, String columnName) throws SQLException {
4039
Clob clob = rs.getClob(columnName);
4140
return toString(clob);
4241
}
4342

4443
@Override
45-
public String getNullableResult(ResultSet rs, int columnIndex)
46-
throws SQLException {
44+
public String getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
4745
Clob clob = rs.getClob(columnIndex);
4846
return toString(clob);
4947
}
5048

5149
@Override
52-
public String getNullableResult(CallableStatement cs, int columnIndex)
53-
throws SQLException {
50+
public String getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
5451
Clob clob = cs.getClob(columnIndex);
5552
return toString(clob);
5653
}

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2022 the original author or authors.
2+
* Copyright 2009-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,20 +32,17 @@ public void setNonNullParameter(PreparedStatement ps, int i, String parameter, J
3232
}
3333

3434
@Override
35-
public String getNullableResult(ResultSet rs, String columnName)
36-
throws SQLException {
35+
public String getNullableResult(ResultSet rs, String columnName) throws SQLException {
3736
return rs.getNString(columnName);
3837
}
3938

4039
@Override
41-
public String getNullableResult(ResultSet rs, int columnIndex)
42-
throws SQLException {
40+
public String getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
4341
return rs.getNString(columnIndex);
4442
}
4543

4644
@Override
47-
public String getNullableResult(CallableStatement cs, int columnIndex)
48-
throws SQLException {
45+
public String getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
4946
return cs.getNString(columnIndex);
5047
}
5148

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2022 the original author or authors.
2+
* Copyright 2009-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,20 +32,17 @@ public void setNonNullParameter(PreparedStatement ps, int i, Object parameter, J
3232
}
3333

3434
@Override
35-
public Object getNullableResult(ResultSet rs, String columnName)
36-
throws SQLException {
35+
public Object getNullableResult(ResultSet rs, String columnName) throws SQLException {
3736
return rs.getObject(columnName);
3837
}
3938

4039
@Override
41-
public Object getNullableResult(ResultSet rs, int columnIndex)
42-
throws SQLException {
40+
public Object getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
4341
return rs.getObject(columnIndex);
4442
}
4543

4644
@Override
47-
public Object getNullableResult(CallableStatement cs, int columnIndex)
48-
throws SQLException {
45+
public Object getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
4946
return cs.getObject(columnIndex);
5047
}
5148
}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2022 the original author or authors.
2+
* Copyright 2009-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,13 +23,14 @@
2323

2424
/**
2525
* @since 3.4.5
26+
*
2627
* @author Tomas Rohovsky
2728
*/
2829
public class OffsetDateTimeTypeHandler extends BaseTypeHandler<OffsetDateTime> {
2930

3031
@Override
3132
public void setNonNullParameter(PreparedStatement ps, int i, OffsetDateTime parameter, JdbcType jdbcType)
32-
throws SQLException {
33+
throws SQLException {
3334
ps.setObject(i, parameter);
3435
}
3536

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2022 the original author or authors.
2+
* Copyright 2009-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,13 +23,14 @@
2323

2424
/**
2525
* @since 3.4.5
26+
*
2627
* @author Tomas Rohovsky
2728
*/
2829
public class OffsetTimeTypeHandler extends BaseTypeHandler<OffsetTime> {
2930

3031
@Override
3132
public void setNonNullParameter(PreparedStatement ps, int i, OffsetTime parameter, JdbcType jdbcType)
32-
throws SQLException {
33+
throws SQLException {
3334
ps.setObject(i, parameter);
3435
}
3536

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

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2022 the original author or authors.
2+
* Copyright 2009-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,28 +26,24 @@
2626
public class ShortTypeHandler extends BaseTypeHandler<Short> {
2727

2828
@Override
29-
public void setNonNullParameter(PreparedStatement ps, int i, Short parameter, JdbcType jdbcType)
30-
throws SQLException {
29+
public void setNonNullParameter(PreparedStatement ps, int i, Short parameter, JdbcType jdbcType) throws SQLException {
3130
ps.setShort(i, parameter);
3231
}
3332

3433
@Override
35-
public Short getNullableResult(ResultSet rs, String columnName)
36-
throws SQLException {
34+
public Short getNullableResult(ResultSet rs, String columnName) throws SQLException {
3735
short result = rs.getShort(columnName);
3836
return result == 0 && rs.wasNull() ? null : result;
3937
}
4038

4139
@Override
42-
public Short getNullableResult(ResultSet rs, int columnIndex)
43-
throws SQLException {
40+
public Short getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
4441
short result = rs.getShort(columnIndex);
4542
return result == 0 && rs.wasNull() ? null : result;
4643
}
4744

4845
@Override
49-
public Short getNullableResult(CallableStatement cs, int columnIndex)
50-
throws SQLException {
46+
public Short getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
5147
short result = cs.getShort(columnIndex);
5248
return result == 0 && cs.wasNull() ? null : result;
5349
}

0 commit comments

Comments
 (0)