fix stuff for jdk 11

pull/1/head
hYdos 2020-02-23 11:23:04 +10:00
parent 9047d03883
commit a338adb088
2 changed files with 3 additions and 3 deletions

View File

@ -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()) {

View File

@ -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)
) {