Skip to content

Commit

Permalink
Merge pull request #298 from kfiravr2/master
Browse files Browse the repository at this point in the history
memory leak fix
  • Loading branch information
Travis Foster authored Oct 31, 2019
2 parents 981c64c + 90f5441 commit 1634a3f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions storage/uniqueNugetDeploy/uniqueNugetDeploy.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ try {
ngas = org.artifactory.addon.nuget.repomd.NuGetArtifactoryService.class
} catch (MissingPropertyException ex) {}

def cpath = "plugins/uniqueNugetDeploy.properties"
def cfile = new File(ctx.artifactoryHome.haAwareEtcDir, cpath)
def config = new ConfigSlurper().parse(cfile.toURL())


class FakeUriInfo implements UriInfo {
MultivaluedMap<String,String> ps;
public FakeUriInfo(MultivaluedMap<String,String> ps) {this.ps = ps}
Expand All @@ -62,9 +67,6 @@ class FakeUriInfo implements UriInfo {

storage {
beforeCreate { item ->
def cpath = "plugins/uniqueNugetDeploy.properties"
def cfile = new File(ctx.artifactoryHome.haAwareEtcDir, cpath)
def config = new ConfigSlurper().parse(cfile.toURL())
def repoKeys = config.checkedRepos as String[]
def filtKeys = config.filteredRepos as String[]
if (!item || !(item.repoKey in filtKeys)) return
Expand Down

0 comments on commit 1634a3f

Please sign in to comment.