use of org.eclipse.sw360.datahandler.common.CommonUtils.nullToEmptyList in project sw360portal by sw360.
the class MyTaskSubmissionsPortlet method doView.
@Override
public void doView(RenderRequest request, RenderResponse response) throws IOException, PortletException {
List<ModerationRequest> moderations = null;
try {
final User user = UserCacheHolder.getUserFromRequest(request);
moderations = thriftClients.makeModerationClient().getRequestsByRequestingUser(user);
} catch (TException e) {
log.error("Could not fetch your moderations from backend", e);
}
request.setAttribute(PortalConstants.MODERATION_REQUESTS, CommonUtils.nullToEmptyList(moderations));
super.doView(request, response);
}
Aggregations