File tree Expand file tree Collapse file tree
server/src/main/java/com/defold/extender/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -253,14 +253,11 @@ public boolean isLocalSdkSupported() {
253253
254254 protected void evictCache () {
255255 synchronized (cacheReferenceCount ) {
256- try {
256+ try ( Stream < Path > entries = Files . list ( configuration . getLocation ())) {
257257 LOGGER .info ("Cache eviction called" );
258258 // Delete old SDK:s
259259 Comparator <Path > refCountComparator = Comparator .comparing (path -> getSdkRefCount (path .getFileName ().toString ()));
260-
261- Files
262- .list (configuration .getLocation ())
263- .filter (path -> !path .getFileName ().toString ().startsWith ("tmp" )
260+ entries .filter (path -> !path .getFileName ().toString ().startsWith ("tmp" )
264261 && !path .toString ().endsWith (".delete" )
265262 && !path .getFileName ().toString ().equals (TEST_SDK_DIRECTORY ))
266263 .sorted (refCountComparator .reversed ())
You can’t perform that action at this time.
0 commit comments