This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects

Fix pmd warnings

Closed Administrator requested to merge fix_pmd_warnings into development
Files
3
@@ -173,9 +173,7 @@ public class FileService implements DisposableBean {
final GitLabApi gitLabApi = gitLabRepository.getGitLabApi(tokenProvider.getGitLabAccessInfo());
// first we try with user credentials!
Optional<TreeNode<SearchResultDTO>> filter;
filter = Optional.empty(); // return everything
Optional<TreeNode<SearchResultDTO>> filter = Optional.of(exerciseTree);
try (
InputStream checkAuthorization = gitLabApi
.getRepositoryApi()
@@ -198,12 +196,8 @@ public class FileService implements DisposableBean {
.getRepositoryApi()
.getRepositoryArchive(Integer.toString(exerciseTree.getData().getProject().getProject_id()), "HEAD", ZIP)
) {
if (exerciseTree.getData().getMetadata().getPublicVisibility() == null) {
if (exerciseTree.getData().getMetadata().getPublicVisibility() == null && filter.isPresent()) {
return null;
} else {
if (repositoryArchive != null) {
filter = Optional.of(exerciseTree);
}
}
InputStream project = zipRepackagingService.rePackageGitLabProjectZip(