Skip to content

Commit 1c7bf6c

Browse files
author
Xiang Zhong
committed
rename method arguments
1 parent 21c7c74 commit 1c7bf6c

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/GenerateQuery.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@
1515
*******************************************************************************/
1616
package com.intuit.ipp.query;
1717

18-
import java.lang.reflect.Method;
1918
import java.util.Calendar;
2019
import java.util.Date;
2120

22-
import com.intuit.ipp.data.Customer;
2321
import net.bytebuddy.ByteBuddy;
2422
import net.bytebuddy.dynamic.loading.ClassLoadingStrategy;
2523
import net.bytebuddy.implementation.MethodDelegation;

ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/MyMethodInterceptor.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ public MyMethodInterceptor() {
6161
}
6262

6363
@RuntimeType
64-
public Object intercept(@This Object arg0, @Origin Method arg1, @AllArguments Object[] arg2, @SuperMethod(nullIfImpossible = true) Method arg3) throws FMSException {
64+
public Object intercept(@This Object proxyObject, @Origin Method method, @AllArguments Object[] methodArgs, @SuperMethod(nullIfImpossible = true) Method superMethod) throws FMSException {
6565

6666
if (GenerateQuery.path.get() == null) {
67-
GenerateQuery.path.set(new Path<Object>(extractPropertyName(arg1), extractEntity(arg0)));
67+
GenerateQuery.path.set(new Path<Object>(extractPropertyName(method), extractEntity(proxyObject)));
6868
} else {
6969
String parentPath = GenerateQuery.path.get().getPathString();
70-
GenerateQuery.path.get().setPathString(parentPath.concat(".").concat(extractPropertyName(arg1)));
70+
GenerateQuery.path.get().setPathString(parentPath.concat(".").concat(extractPropertyName(method)));
7171
}
72-
return createInstance(arg0, arg1, arg2, arg3);
72+
return createInstance(proxyObject, method, methodArgs, superMethod);
7373
}
7474

7575
/**
@@ -101,15 +101,15 @@ protected String extractPropertyName(Method method) {
101101
/**
102102
* create the object for linked method call or object of leaf node
103103
*
104-
* @param type
104+
* @param
105105
* @return
106106
* @throws Throwable
107107
*/
108108
@SuppressWarnings("unchecked")
109-
public <T> T createInstance(Object arg0, Method arg1, Object[] arg2, Method arg3)
109+
public <T> T createInstance(Object proxyObject, Method method, Object[] methodArgs, Method superMethod)
110110
throws FMSException {
111111
Object obj = null;
112-
Class<?> type = arg1.getReturnType();
112+
Class<?> type = method.getReturnType();
113113
if (String.class.equals(type)) {
114114
obj = null;
115115
} else if (Integer.class.equals(type) || int.class.equals(type)) {
@@ -140,10 +140,10 @@ public <T> T createInstance(Object arg0, Method arg1, Object[] arg2, Method arg3
140140
obj = Boolean.TRUE;
141141
} else if (List.class.isAssignableFrom(type)) {
142142
try {
143-
Type t = arg1.getGenericReturnType();
143+
Type t = method.getGenericReturnType();
144144
Object value = getObject(t);
145145
Object queryValue = GenerateQuery.createQueryEntity(value);
146-
obj = arg3.invoke(arg0, arg2);
146+
obj = superMethod.invoke(proxyObject, methodArgs);
147147
((List<Object>) obj).add(queryValue);
148148
} catch (Throwable t) {
149149
throw new FMSException(t);

0 commit comments

Comments
 (0)