Skip to content

Commit

Permalink
refactor(core/test): refactor NioGroovyMethods.readBytes() to use jav…
Browse files Browse the repository at this point in the history
…a.nio.file.Files (#1390)

This change would make code less dependent on groovy upgrades.
Test coverage remain same before and after refactor (Tests executed 305).
  • Loading branch information
j-sandy authored Sep 19, 2023
1 parent 6f343f3 commit 765dbdb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import spock.lang.Specification
import spock.lang.Subject

import java.nio.file.Path
import java.nio.file.Files

class CachingPluginBinaryStorageServiceSpec extends Specification {

Expand Down Expand Up @@ -58,6 +59,6 @@ class CachingPluginBinaryStorageServiceSpec extends Specification {
}

private String getCacheFile(String key) {
return new String(getCachePath(key).readBytes())
return new String(Files.readAllBytes(getCachePath(key)))
}
}

0 comments on commit 765dbdb

Please sign in to comment.