javeme commented on code in PR #1855:
URL:
https://github.com/apache/incubator-hugegraph/pull/1855#discussion_r865546918
##########
hugegraph-core/src/main/java/com/baidu/hugegraph/util/Reflection.java:
##########
@@ -55,39 +55,39 @@ public class Reflection {
}
}
- reflectionClazz = reflectionClazzTemp;
+ REFLECTION_CLAZZ = reflectionClazzTemp;
- if (reflectionClazz != null) {
+ if (REFLECTION_CLAZZ != null) {
try {
registerFieldsToFilterMethodTemp =
- reflectionClazz.getMethod("registerFieldsToFilter",
+ REFLECTION_CLAZZ.getMethod("registerFieldsToFilter",
Class.class, String[].class);
} catch (Throwable e) {
LOG.error("Can't find registerFieldsToFilter method", e);
}
try {
registerMethodsToFilterMethodTemp =
- reflectionClazz.getMethod("registerMethodsToFilter",
+ REFLECTION_CLAZZ.getMethod("registerMethodsToFilter",
Review Comment:
also update alignment of line 72
##########
hugegraph-core/src/main/java/com/baidu/hugegraph/util/Reflection.java:
##########
@@ -55,39 +55,39 @@ public class Reflection {
}
}
- reflectionClazz = reflectionClazzTemp;
+ REFLECTION_CLAZZ = reflectionClazzTemp;
- if (reflectionClazz != null) {
+ if (REFLECTION_CLAZZ != null) {
try {
registerFieldsToFilterMethodTemp =
- reflectionClazz.getMethod("registerFieldsToFilter",
+ REFLECTION_CLAZZ.getMethod("registerFieldsToFilter",
Class.class, String[].class);
} catch (Throwable e) {
LOG.error("Can't find registerFieldsToFilter method", e);
}
try {
registerMethodsToFilterMethodTemp =
- reflectionClazz.getMethod("registerMethodsToFilter",
+ REFLECTION_CLAZZ.getMethod("registerMethodsToFilter",
Class.class, String[].class);
} catch (NoSuchMethodException e) {
LOG.error("Can't find registerMethodsToFilter method", e);
}
}
- registerFieldsToFilterMethod = registerFieldsToFilterMethodTemp;
- registerMethodsToFilterMethod = registerMethodsToFilterMethodTemp;
+ REGISTER_FILEDS_TO_FILTER_METHOD = registerFieldsToFilterMethodTemp;
+ REGISTER_METHODS_TO_FILTER_MOTHOD = registerMethodsToFilterMethodTemp;
}
public static void registerFieldsToFilter(Class<?> containingClass,
String... fieldNames) {
- if (registerFieldsToFilterMethod == null) {
+ if (REGISTER_FILEDS_TO_FILTER_METHOD == null) {
throw new NotSupportException(
"Reflection.registerFieldsToFilter()");
}
try {
- registerFieldsToFilterMethod.setAccessible(true);
- registerFieldsToFilterMethod.invoke(reflectionClazz,
+ REGISTER_FILEDS_TO_FILTER_METHOD.setAccessible(true);
+ REGISTER_FILEDS_TO_FILTER_METHOD.invoke(REFLECTION_CLAZZ,
Review Comment:
also update alignment of line 91
##########
hugegraph-core/src/main/java/com/baidu/hugegraph/util/Reflection.java:
##########
@@ -98,14 +98,14 @@ public static void registerFieldsToFilter(Class<?>
containingClass,
public static void registerMethodsToFilter(Class<?> containingClass,
String... methodNames) {
- if (registerMethodsToFilterMethod == null) {
+ if (REGISTER_METHODS_TO_FILTER_MOTHOD == null) {
throw new NotSupportException(
"Reflection.registerMethodsToFilterMethod()");
}
try {
- registerMethodsToFilterMethod.setAccessible(true);
- registerMethodsToFilterMethod.invoke(reflectionClazz,
+ REGISTER_METHODS_TO_FILTER_MOTHOD.setAccessible(true);
+ REGISTER_METHODS_TO_FILTER_MOTHOD.invoke(REFLECTION_CLAZZ,
Review Comment:
also update alignment of line 109
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]