--- old/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompiledCodeBuilder.java 2018-12-11 11:12:48.000000000 -0800 +++ new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompiledCodeBuilder.java 2018-12-11 11:12:48.000000000 -0800 @@ -36,8 +36,6 @@ import java.util.List; import java.util.ListIterator; import java.util.Map; -import java.util.stream.Stream; -import java.util.stream.Stream.Builder; import org.graalvm.compiler.api.replacements.MethodSubstitution; import org.graalvm.compiler.api.replacements.Snippet; @@ -113,13 +111,13 @@ byte[] dataSection = new byte[data.getSectionSize()]; ByteBuffer buffer = ByteBuffer.wrap(dataSection).order(ByteOrder.nativeOrder()); - Builder patchBuilder = Stream.builder(); + List patches = new ArrayList<>(); data.buildDataSection(buffer, (position, vmConstant) -> { - patchBuilder.accept(new DataPatch(position, new ConstantReference(vmConstant))); + patches.add(new DataPatch(position, new ConstantReference(vmConstant))); }); int dataSectionAlignment = data.getSectionAlignment(); - DataPatch[] dataSectionPatches = patchBuilder.build().toArray(len -> new DataPatch[len]); + DataPatch[] dataSectionPatches = patches.toArray(new DataPatch[patches.size()]); int totalFrameSize = compResult.getTotalFrameSize(); StackSlot customStackArea = compResult.getCustomStackArea();