Skip to content

Commit

Permalink
Avoid unnecessary steps
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielThomas authored and Sunjeet committed Nov 16, 2023
1 parent aa7c9bd commit e7ce7db
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ public GarbageCollectorAwareRecycler(int log2OfByteSegmentSize, int log2OfLongSe
.stream()
.map(MemoryManagerMXBean::getName)
.map(name -> name.split(" ")[0]) // In the form '<GC> <Phase>', for instance 'PS Scavenge' or 'ZGC Major Pauses'
.distinct()
.findFirst()
.map(LOW_PAUSE_COLLECTORS::contains)
.orElse(false);
.anyMatch(LOW_PAUSE_COLLECTORS::contains);
delegate = isLowPause ? new WastefulRecycler(log2OfByteSegmentSize, log2OfLongSegmentSize)
: new RecyclingRecycler(log2OfByteSegmentSize, log2OfLongSegmentSize);
}
Expand Down

0 comments on commit e7ce7db

Please sign in to comment.