throws PortalException {
try {
Group group = groupLocalService.getGroup(repositoryId);
SyncUtil.checkSyncEnabled(group.getGroupId());
if (!group.isUser() &&
<BUG>(serviceContext.getGroupPermissions() == null)) {
</BUG>
SyncUtil.setFilePermissions(group, false, serviceContext);
}
FileEntry fileEntry = dlAppService.addFileEntry(

throws PortalException {
try {
Group group = groupLocalService.getGroup(repositoryId);
SyncUtil.checkSyncEnabled(group.getGroupId());
if (!group.isUser() &&
ArrayUtil.isEmpty(serviceContext.getGroupPermissions())) {
SyncUtil.setFilePermissions(group, false, serviceContext);
}
FileEntry fileEntry = dlAppService.addFileEntry(
