Skip to content

Commit

Permalink
LPS-100389 Use set
Browse files Browse the repository at this point in the history
  • Loading branch information
shuyangzhou authored and brianchandotcom committed Oct 30, 2020
1 parent 3cc4e71 commit 7e8a086
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@
import com.liferay.portal.kernel.messaging.proxy.ProxyModeThreadLocal;
import com.liferay.portal.kernel.messaging.proxy.ProxyRequest;
import com.liferay.portal.kernel.spring.aop.InvocationHandlerFactory;
import com.liferay.portal.kernel.util.ArrayUtil;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

/**
* @author Shuyang Zhou
*/
Expand All @@ -43,7 +46,7 @@ public MultiDestinationMessagingProxyInvocationHandler(
public Object invoke(Object proxy, Method method, Object[] args)
throws Throwable {

if (ArrayUtil.contains(_objectMethods, method)) {
if (_objectMethods.contains(method)) {
return method.invoke(_baseMultiDestinationProxyBean, args);
}

Expand Down Expand Up @@ -71,8 +74,8 @@ public InvocationHandler createInvocationHandler(Object object) {

};

private static final Method[] _objectMethods =
Object.class.getDeclaredMethods();
private static final Set<Method> _objectMethods = new HashSet<>(
Arrays.asList(Object.class.getDeclaredMethods()));

private final BaseMultiDestinationProxyBean _baseMultiDestinationProxyBean;

Expand Down

0 comments on commit 7e8a086

Please sign in to comment.