Skip to content

Commit 6593807

Browse files
authored
Merge pull request #1863 from hazendaz/master
Various checkstyle formatting issues
2 parents fc0403d + 2d7b3b3 commit 6593807

File tree

8 files changed

+15
-14
lines changed

8 files changed

+15
-14
lines changed

src/main/java/org/apache/ibatis/builder/annotation/ProviderSqlSource.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public ProviderSqlSource(Configuration configuration, Object provider) {
7676
*/
7777
@Deprecated
7878
public ProviderSqlSource(Configuration configuration, Object provider, Class<?> mapperType, Method mapperMethod) {
79-
this(configuration, (Annotation) provider , mapperType, mapperMethod);
79+
this(configuration, (Annotation) provider, mapperType, mapperMethod);
8080
}
8181

8282
/**
@@ -162,8 +162,8 @@ private SqlSource createSqlSource(Object parameterObject) {
162162
String sql;
163163
if (parameterObject instanceof Map) {
164164
int bindParameterCount = providerMethodParameterTypes.length - (providerContext == null ? 0 : 1);
165-
if (bindParameterCount == 1 &&
166-
(providerMethodParameterTypes[Integer.valueOf(0).equals(providerContextIndex) ? 1 : 0].isAssignableFrom(parameterObject.getClass()))) {
165+
if (bindParameterCount == 1
166+
&& providerMethodParameterTypes[Integer.valueOf(0).equals(providerContextIndex) ? 1 : 0].isAssignableFrom(parameterObject.getClass())) {
167167
sql = invokeProviderMethod(extractProviderMethodArguments(parameterObject));
168168
} else {
169169
@SuppressWarnings("unchecked")

src/main/java/org/apache/ibatis/cache/CacheKey.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ public class CacheKey implements Cloneable, Serializable {
3030
private static final long serialVersionUID = 1146682552656046210L;
3131

3232
public static final CacheKey NULL_CACHE_KEY = new CacheKey() {
33+
3334
@Override
3435
public void update(Object object) {
3536
throw new CacheException("Not allowed to update a null cache key instance.");
3637
}
38+
3739
@Override
3840
public void updateAll(Object[] objects) {
3941
throw new CacheException("Not allowed to update a null cache key instance.");

src/main/java/org/apache/ibatis/executor/resultset/ResultSetWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public List<JdbcType> getJdbcTypes() {
8080
}
8181

8282
public JdbcType getJdbcType(String columnName) {
83-
for (int i = 0 ; i < columnNames.size(); i++) {
83+
for (int i = 0; i < columnNames.size(); i++) {
8484
if (columnNames.get(i).equalsIgnoreCase(columnName)) {
8585
return jdbcTypes.get(i);
8686
}

src/main/java/org/apache/ibatis/io/DefaultVFS.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ public List<String> list(URL url, String path) throws IOException {
122122
if ("file".equals(url.getProtocol())) {
123123
File file = new File(url.getFile());
124124
if (log.isDebugEnabled()) {
125-
log.debug("Listing directory " + file.getAbsolutePath());
125+
log.debug("Listing directory " + file.getAbsolutePath());
126126
}
127127
if (file.isDirectory()) {
128128
if (log.isDebugEnabled()) {
129-
log.debug("Listing " + url);
129+
log.debug("Listing " + url);
130130
}
131131
children = Arrays.asList(file.list());
132132
}

src/main/java/org/apache/ibatis/io/ResolverUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ protected void addIfMatching(Test test, String fqn) {
289289
matches.add((Class<T>) type);
290290
}
291291
} catch (Throwable t) {
292-
log.warn("Could not examine class '" + fqn + "'" + " due to a " +
293-
t.getClass().getName() + " with message: " + t.getMessage());
292+
log.warn("Could not examine class '" + fqn + "'" + " due to a "
293+
+ t.getClass().getName() + " with message: " + t.getMessage());
294294
}
295295
}
296296
}

src/main/java/org/apache/ibatis/io/VFS.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,9 @@ static VFS createVFS() {
5858
Class<? extends VFS> impl = impls.get(i);
5959
try {
6060
vfs = impl.getDeclaredConstructor().newInstance();
61-
if (!vfs.isValid()) {
62-
if (log.isDebugEnabled()) {
63-
log.debug("VFS implementation " + impl.getName() +
64-
" is not valid in this environment.");
65-
}
61+
if (!vfs.isValid() && log.isDebugEnabled()) {
62+
log.debug("VFS implementation " + impl.getName()
63+
+ " is not valid in this environment.");
6664
}
6765
} catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
6866
log.error("Failed to instantiate " + impl, e);

src/main/java/org/apache/ibatis/jdbc/SqlBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static String SQL() {
5252
try {
5353
return sql().toString();
5454
} finally {
55-
RESET();
55+
RESET();
5656
}
5757
}
5858

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
public class ArrayTypeHandler extends BaseTypeHandler<Object> {
4040

4141
private static final ConcurrentHashMap<Class<?>, String> STANDARD_MAPPING;
42+
4243
static {
4344
STANDARD_MAPPING = new ConcurrentHashMap<>();
4445
STANDARD_MAPPING.put(BigDecimal.class, JdbcType.NUMERIC.name());

0 commit comments

Comments
 (0)