This is the codeAbility Sharing Platform! Learn more about the
codeAbility Sharing Platform
.
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
codeAbility Sharing Platform
Manage
Activity
Members
Labels
Plan
Issues
43
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
development
sharing
codeAbility Sharing Platform
Commits
e30e4ecc
Commit
e30e4ecc
authored
2 years ago
by
Michael Breu
Browse files
Options
Downloads
Patches
Plain Diff
Fixing PDM
parent
74cbfcc1
3 merge requests
!148
November Release
,
!146
Put the sonar-analyze job into a separate stage
,
!136
Resolve "Download für Unteraufgaben soll nicht das ganze Projekt runterladen"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/at/ac/uibk/gitsearch/service/ShoppingBasketService.java
+23
-13
23 additions, 13 deletions
...a/at/ac/uibk/gitsearch/service/ShoppingBasketService.java
with
23 additions
and
13 deletions
src/main/java/at/ac/uibk/gitsearch/service/ShoppingBasketService.java
+
23
−
13
View file @
e30e4ecc
package
at.ac.uibk.gitsearch.service
;
import
at.ac.uibk.gitsearch.repository.gitlab.GitLabRepository
;
import
at.ac.uibk.gitsearch.security.jwt.TokenProvider.GitLabAccessInfo
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.DeserializationFeature
;
import
com.fasterxml.jackson.databind.JsonMappingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
;
import
com.google.common.cache.CacheBuilder
;
import
com.google.common.cache.CacheLoader
;
import
com.google.common.cache.LoadingCache
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.PipedInputStream
;
...
...
@@ -22,6 +12,7 @@ import java.util.UUID;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipInputStream
;
import
java.util.zip.ZipOutputStream
;
import
org.apache.commons.lang3.StringUtils
;
import
org.checkerframework.checker.nullness.qual.Nullable
;
import
org.codeability.sharing.plugins.api.ShoppingBasket
;
...
...
@@ -38,6 +29,18 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StreamUtils
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.DeserializationFeature
;
import
com.fasterxml.jackson.databind.JsonMappingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
;
import
com.google.common.cache.CacheBuilder
;
import
com.google.common.cache.CacheLoader
;
import
com.google.common.cache.LoadingCache
;
import
at.ac.uibk.gitsearch.repository.gitlab.GitLabRepository
;
import
at.ac.uibk.gitsearch.security.jwt.TokenProvider.GitLabAccessInfo
;
/**
* Service for exercise/course search results
* <p>
...
...
@@ -411,7 +414,9 @@ public class ShoppingBasketService {
* @return
*/
protected
static
boolean
filterOut
(
String
filePath
,
String
[]
filterOut
,
boolean
isDirectory
)
{
if
(
filePath
==
null
)
return
false
;
if
(
filePath
==
null
)
{
return
false
;
}
for
(
String
filter
:
filterOut
)
{
if
(
filter
==
null
)
{
log
.
warn
(
"filter should never be null!"
);
...
...
@@ -419,9 +424,14 @@ public class ShoppingBasketService {
}
IMatcher
matcher
;
try
{
if
(
filter
.
endsWith
(
FastIgnoreRule
.
PATH_SEPARATOR
+
""
))
matcher
=
IMatcher
.
createPathMatcher
(
filter
.
substring
(
0
,
filter
.
length
()
-
1
),
true
);
else
matcher
=
if
(
filter
.
endsWith
(
Character
.
toString
(
FastIgnoreRule
.
PATH_SEPARATOR
)))
{
matcher
=
IMatcher
.
createPathMatcher
(
filter
.
substring
(
0
,
filter
.
length
()
-
1
),
true
);
}
else
{
matcher
=
IMatcher
.
createPathMatcher
(
filter
,
false
);
}
}
catch
(
InvalidPatternException
e
)
{
log
.
warn
(
"Cannot parse pattern {}"
,
filter
);
continue
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment