Java Code Examples for cn.hutool.core.collection.CollectionUtil#newArrayList()
The following examples show how to use
cn.hutool.core.collection.CollectionUtil#newArrayList() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: microservices-platform File: MenuServiceFallbackFactory.java License: Apache License 2.0 | 5 votes |
@Override public MenuService create(Throwable throwable) { return roleIds -> { log.error("调用findByRoleCodes异常:{}", roleIds, throwable); return CollectionUtil.newArrayList(); }; }
Example 2
Source Project: microservices-platform File: MenuServiceFallbackFactory.java License: Apache License 2.0 | 5 votes |
@Override public MenuService create(Throwable throwable) { return roleIds -> { log.error("调用findByRoleCodes异常:{}", roleIds, throwable); return CollectionUtil.newArrayList(); }; }
Example 3
Source Project: WebStack-Guns File: PermissionCheckServiceServiceImpl.java License: MIT License | 5 votes |
@Override public boolean check(Object[] permissions) { ShiroUser user = ShiroKit.getUser(); if (null == user) { return false; } ArrayList<Object> objects = CollectionUtil.newArrayList(permissions); String join = CollectionUtil.join(objects, ","); if (ShiroKit.hasAnyRoles(join)) { return true; } return false; }
Example 4
Source Project: Guns File: AuthServiceImpl.java License: GNU Lesser General Public License v3.0 | 5 votes |
@Override public boolean check(String[] roleNames) { LoginUser user = LoginContextHolder.getContext().getUser(); if (null == user) { return false; } ArrayList<String> objects = CollectionUtil.newArrayList(roleNames); String join = CollectionUtil.join(objects, ","); if (LoginContextHolder.getContext().hasAnyRoles(join)) { return true; } return false; }
Example 5
Source Project: bitchat File: AbstractSessionManager.java License: Apache License 2.0 | 4 votes |
@Override public List<Session> getAllSessions() { return CollectionUtil.newArrayList(allSession()); }