Skip to content

Commit

Permalink
8273711: Remove redundant stream() call before forEach in jdk.jlink
Browse files Browse the repository at this point in the history
use method references where applicable
  • Loading branch information
turbanoff committed Sep 15, 2021
1 parent 153a9ea commit c071426
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Expand Up @@ -99,9 +99,8 @@ public void configure(Map<String, String> config) {
if (keys == null || keys.isEmpty()) {
throw new IllegalArgumentException("No key specified for delete");
}
Utils.parseList(keys).forEach((k) -> {
release.remove(k);
});
Utils.parseList(keys)
.forEach(release::remove);
}
break;

Expand Down
Expand Up @@ -311,9 +311,7 @@ private void writeDescriptorReference(DataOutputStream out,
buffers.add(buffer);
}
ByteBuffer bb = ByteBuffer.allocate(l);
buffers.forEach((buf) -> {
bb.put(buf);
});
buffers.forEach(bb::put);
byte[] compressed_indices = bb.array();
byte[] compressed_size = CompressIndexes.
compress(compressed_indices.length);
Expand Down

0 comments on commit c071426

Please sign in to comment.