fix stuff for jdk 11
parent
9047d03883
commit
a338adb088
|
@ -49,11 +49,11 @@ public class Image {
|
|||
|
||||
public static Image createImage(String imagePath) {
|
||||
ByteBuffer img;
|
||||
ByteBuffer imageBuffer;
|
||||
ByteBuffer imageBuffer = null;
|
||||
try {
|
||||
imageBuffer = IOUtil.ioResourceToByteBuffer(imagePath, 8 * 1024);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
try (MemoryStack stack = stackPush()) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public class IOUtil {
|
|||
ByteBuffer buffer;
|
||||
try (
|
||||
|
||||
InputStream source = Class.class.getResourceAsStream(resource);
|
||||
InputStream source = IOUtil.class.getResourceAsStream(resource);
|
||||
|
||||
ReadableByteChannel rbc = Channels.newChannel(source)
|
||||
) {
|
||||
|
|
Loading…
Reference in New Issue