src/jdk.aot/share/classes/jdk.tools.jaotc.binformat/src/jdk/tools/jaotc/binformat/macho/MachOByteBuffer.java
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File hotspot Cdiff src/jdk.aot/share/classes/jdk.tools.jaotc.binformat/src/jdk/tools/jaotc/binformat/macho/MachOByteBuffer.java

src/jdk.aot/share/classes/jdk.tools.jaotc.binformat/src/jdk/tools/jaotc/binformat/macho/MachOByteBuffer.java

Print this page

        

*** 21,44 **** * questions. */ package jdk.tools.jaotc.binformat.macho; - import java.nio.ByteBuffer; import java.nio.ByteOrder; import jdk.tools.jaotc.binformat.macho.MachOTargetInfo; - import jdk.tools.jaotc.binformat.macho.MachO.mach_header_64; ! public class MachOByteBuffer { ! public static ByteBuffer allocate(int size) { ByteBuffer buf = ByteBuffer.allocate(size); ! if (MachOTargetInfo.getMachOEndian() == ! MachO.mach_header_64.CPU_SUBTYPE_LITTLE_ENDIAN) buf.order(ByteOrder.LITTLE_ENDIAN); ! else buf.order(ByteOrder.BIG_ENDIAN); return (buf); } } --- 21,42 ---- * questions. */ package jdk.tools.jaotc.binformat.macho; import java.nio.ByteBuffer; import java.nio.ByteOrder; import jdk.tools.jaotc.binformat.macho.MachOTargetInfo; ! final class MachOByteBuffer { ! static ByteBuffer allocate(int size) { ByteBuffer buf = ByteBuffer.allocate(size); ! if (MachOTargetInfo.getMachOEndian() == MachO.mach_header_64.CPU_SUBTYPE_LITTLE_ENDIAN) { buf.order(ByteOrder.LITTLE_ENDIAN); ! } else { buf.order(ByteOrder.BIG_ENDIAN); + } return (buf); } }
src/jdk.aot/share/classes/jdk.tools.jaotc.binformat/src/jdk/tools/jaotc/binformat/macho/MachOByteBuffer.java
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File