Suppress necessary deprecation warnings (for finalize), since this is native code and is necessary

This commit is contained in:
nathan 2020-08-18 22:00:51 +02:00
parent caa6e5e3fc
commit 9adfc35908
7 changed files with 10 additions and 1 deletions

View File

@ -29,6 +29,7 @@ class GObjectType extends PointerType {
super(p);
}
@SuppressWarnings("deprecation")
@Override
protected
void finalize() throws Throwable {

View File

@ -199,7 +199,9 @@ class Gtk2 implements Gtk {
public native
Pointer gtk_image_menu_item_new_from_stock(final String stock_id, final Pointer accel_group);
@Deprecated
@Override
@SuppressWarnings("deprecation")
public native
boolean gtk_show_uri(final Pointer screen, final String uri, final int timestamp, final Pointer error);

View File

@ -294,6 +294,8 @@ class Gtk3 implements Gtk {
public native
Pointer gtk_image_menu_item_new_from_stock(final String stock_id, final Pointer accel_group);
@Deprecated
@SuppressWarnings("deprecation")
@Override
public native
boolean gtk_show_uri(final Pointer screen, final String uri, final int timestamp, final Pointer error);

View File

@ -42,6 +42,8 @@ class NSObject extends Pointer {
this(Pointer.nativeValue(pointer));
}
@Override
@SuppressWarnings("deprecation")
protected
void finalize() throws Throwable {
release();

View File

@ -47,7 +47,7 @@ class ObjectiveC {
Pointer sel_registerName(String name);
}
private static final Objc INSTANCE = Native.loadLibrary("objc", Objc.class);
private static final Objc INSTANCE = Native.load("objc", Objc.class);
/**
* Returns the class definition of a specified class.

View File

@ -102,6 +102,7 @@ public class HBITMAPWrap extends HBITMAP {
this.img = img;
}
@SuppressWarnings("deprecation")
@Override
protected void finalize() throws Throwable {
close();

View File

@ -65,6 +65,7 @@ public class HICONWrap extends HICON {
}
}
@SuppressWarnings("deprecation")
@Override
protected void finalize() throws Throwable {
close();