package com.gkhy.safePlatform.commons.utils; import com.gkhy.safePlatform.commons.enums.ResultCodes; import com.gkhy.safePlatform.commons.exception.AusinessException; import com.gkhy.safePlatform.commons.exception.BusinessException; import com.gkhy.safePlatform.commons.vo.ResultVO; import java.util.ArrayList; import java.util.List; public class RPCUtils { /** * @Description: 检查是否正常返回 */ public static List castList(Object obj, Class clazz) { List result = new ArrayList(); if(obj instanceof List) { for (Object o : (List) obj) { result.add(clazz.cast(o)); } } return result; } }