Add UNSAFE util.
This commit is contained in:
		@@ -1,7 +1,6 @@
 | 
				
			|||||||
package io.izzel.taboolib.util;
 | 
					package io.izzel.taboolib.util;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import sun.misc.Unsafe;
 | 
					import sun.misc.Unsafe;
 | 
				
			||||||
import sun.reflect.CallerSensitive;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.lang.reflect.Field;
 | 
					import java.lang.reflect.Field;
 | 
				
			||||||
import java.security.ProtectionDomain;
 | 
					import java.security.ProtectionDomain;
 | 
				
			||||||
@@ -20,11 +19,6 @@ public class UNSAFE {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @CallerSensitive
 | 
					 | 
				
			||||||
    public static Unsafe getUnsafe() {
 | 
					 | 
				
			||||||
        return Unsafe.getUnsafe();
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public static int getInt(Object o, long offset) {
 | 
					    public static int getInt(Object o, long offset) {
 | 
				
			||||||
        return unsafe.getInt(o, offset);
 | 
					        return unsafe.getInt(o, offset);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user