Skip to content

Commit 7b39ea6

Browse files
committed
[ci] Fix a few more checkstyle issues
1 parent 7df6d27 commit 7b39ea6

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ public class JBoss6VFS extends VFS {
3636
/** A class that mimics a tiny subset of the JBoss VirtualFile class. */
3737
static class VirtualFile {
3838
static Class<?> VirtualFile;
39-
static Method getPathNameRelativeTo, getChildrenRecursively;
39+
static Method getPathNameRelativeTo;
40+
static Method getChildrenRecursively;
4041

4142
Object virtualFile;
4243

@@ -138,7 +139,7 @@ protected static void checkReturnType(Method method, Class<?> expected) {
138139

139140
/** Mark this {@link VFS} as invalid for the current environment. */
140141
protected static void setInvalid() {
141-
if (JBoss6VFS.valid == Boolean.TRUE) {
142+
if (JBoss6VFS.valid.booleanValue()) {
142143
log.debug("JBoss 6 VFS API is not available in this environment.");
143144
JBoss6VFS.valid = Boolean.FALSE;
144145
}

src/main/java/org/apache/ibatis/reflection/MetaClass.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,18 @@ private Type getGenericGetterType(String propertyName) {
116116
try {
117117
Invoker invoker = reflector.getGetInvoker(propertyName);
118118
if (invoker instanceof MethodInvoker) {
119-
Field _method = MethodInvoker.class.getDeclaredField("method");
120-
_method.setAccessible(true);
121-
Method method = (Method) _method.get(invoker);
119+
Field declaredMethod = MethodInvoker.class.getDeclaredField("method");
120+
declaredMethod.setAccessible(true);
121+
Method method = (Method) declaredMethod.get(invoker);
122122
return TypeParameterResolver.resolveReturnType(method, reflector.getType());
123123
} else if (invoker instanceof GetFieldInvoker) {
124-
Field _field = GetFieldInvoker.class.getDeclaredField("field");
125-
_field.setAccessible(true);
126-
Field field = (Field) _field.get(invoker);
124+
Field declaredField = GetFieldInvoker.class.getDeclaredField("field");
125+
declaredField.setAccessible(true);
126+
Field field = (Field) declaredField.get(invoker);
127127
return TypeParameterResolver.resolveFieldType(field, reflector.getType());
128128
}
129-
} catch (NoSuchFieldException | IllegalAccessException ignored) {
129+
} catch (NoSuchFieldException | IllegalAccessException e) {
130+
// Ignored
130131
}
131132
return null;
132133
}

0 commit comments

Comments
 (0)