Skip to content

Commit

Permalink
Fix Eclipse compile problem in ModelLoadingService (#54670)
Browse files Browse the repository at this point in the history
Current Eclipse 4.14.0 cannot deal with the direct lambda notation, changing to
an exlicite one.
  • Loading branch information
Christoph Büscher committed Apr 3, 2020
1 parent 31b69ed commit 9841b74
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ public ModelLoadingService(TrainedModelProvider trainedModelProvider,
this.localModelCache = CacheBuilder.<String, LocalModel>builder()
.setMaximumWeight(this.maxCacheSize.getBytes())
.weigher((id, localModel) -> localModel.ramBytesUsed())
.removalListener(this::cacheEvictionListener)
// explicit declaration of the listener lambda necessary for Eclipse IDE 4.14
.removalListener(notification -> cacheEvictionListener(notification))
.setExpireAfterAccess(INFERENCE_MODEL_CACHE_TTL.get(settings))
.build();
clusterService.addListener(this);
Expand Down

0 comments on commit 9841b74

Please sign in to comment.