src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/utils/NativeOrderOutputStream.java
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File
*** old/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/utils/NativeOrderOutputStream.java	Tue Aug 22 11:47:05 2017
--- new/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/utils/NativeOrderOutputStream.java	Tue Aug 22 11:47:05 2017

*** 1,7 **** --- 1,7 ---- /* ! * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 27,37 **** --- 27,37 ---- import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.ArrayList; import java.util.List; ! public final class NativeOrderOutputStream { private final PatchableByteOutputStream os = new PatchableByteOutputStream(); private final byte[] backingArray = new byte[8]; private final ByteBuffer buffer; private final List<Patchable> patches = new ArrayList<>(); private int size;
*** 179,189 **** --- 179,189 ---- } private static class PatchableByteOutputStream extends ByteArrayOutputStream { public void writeAt(byte[] data, int length, int position) { ! long end = (long) position + (long) length; if (buf.length < end) { throw new IllegalArgumentException("Array not properly sized"); } System.arraycopy(data, 0, buf, position, length); }

src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/utils/NativeOrderOutputStream.java
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File