diff --git a/Examples/test-suite/java_director.i b/Examples/test-suite/java_director.i index 03d733d6a..6b2cb6dfe 100644 --- a/Examples/test-suite/java_director.i +++ b/Examples/test-suite/java_director.i @@ -7,6 +7,7 @@ %module(directors="1") java_director %typemap(javafinalize) SWIGTYPE %{ + @SuppressWarnings("deprecation") protected void finalize() { // System.out.println("Finalizing " + this); delete(); diff --git a/Examples/test-suite/java_throws.i b/Examples/test-suite/java_throws.i index bb5c6e48f..c137da804 100644 --- a/Examples/test-suite/java_throws.i +++ b/Examples/test-suite/java_throws.i @@ -192,6 +192,7 @@ try { // Need to handle the checked exception in NoExceptTest.delete() %typemap(javafinalize) SWIGTYPE %{ + @SuppressWarnings("deprecation") protected void finalize() { try { delete(); diff --git a/Lib/java/java.swg b/Lib/java/java.swg index 19e597bd9..bcab5a6fd 100644 --- a/Lib/java/java.swg +++ b/Lib/java/java.swg @@ -1273,6 +1273,7 @@ SWIG_JAVABODY_PROXY(protected, protected, SWIGTYPE) SWIG_JAVABODY_TYPEWRAPPER(protected, protected, protected, SWIGTYPE) %typemap(javafinalize) SWIGTYPE %{ + @SuppressWarnings("deprecation") protected void finalize() { delete(); }