Permalink
Browse files

Unsafe buffers are the only ones that expose memoryAddress()

  • Loading branch information...
minecrafter committed Nov 5, 2016
1 parent 4bf5083 commit d42bd884ee34461d6265766b7b450aec08560d12
Showing with 3 additions and 1 deletion.
  1. +3 −1 natives/src/main/java/net/md_5/bungee/jni/NativeCode.java
@@ -1,6 +1,7 @@
package net.md_5.bungee.jni;
import com.google.common.io.ByteStreams;
import io.netty.util.internal.PlatformDependent;
import lombok.Getter;
import net.md_5.bungee.jni.cipher.BungeeCipher;
@@ -79,6 +80,7 @@ public boolean load()
public static boolean isSupported()
{
return "Linux".equals( System.getProperty( "os.name" ) ) && "amd64".equals( System.getProperty( "os.arch" ) );
return PlatformDependent.hasUnsafe() && "Linux".equals( System.getProperty( "os.name" ) )
&& "amd64".equals( System.getProperty( "os.arch" ) );
}
}

0 comments on commit d42bd88

Please sign in to comment.