diff options
-rw-r--r-- | CHANGES.current | 6 | ||||
-rw-r--r-- | Examples/test-suite/java_director.i | 2 | ||||
-rw-r--r-- | Examples/test-suite/java_throws.i | 2 | ||||
-rw-r--r-- | Lib/java/java.swg | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/CHANGES.current b/CHANGES.current index e970409f7..285d9e8db 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -7,6 +7,12 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/ Version 4.2.0 (in progress) =========================== +2023-05-12: olly + [Java] #2556 Suppress Java removal warnings on finalize method. + SWIG will need to stop relying on finalize methods, but we know + that and meanwhile these warnings make the testsuite output very + noisy. + 2023-05-11: olly #302 #2079 #2474 Parse storage class more flexibly. diff --git a/Examples/test-suite/java_director.i b/Examples/test-suite/java_director.i index 6b2cb6dfe..adfffaa5b 100644 --- a/Examples/test-suite/java_director.i +++ b/Examples/test-suite/java_director.i @@ -7,7 +7,7 @@ %module(directors="1") java_director %typemap(javafinalize) SWIGTYPE %{ - @SuppressWarnings("deprecation") + @SuppressWarnings({"deprecation", "removal"}) 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 67d8d4ebc..7463fee83 100644 --- a/Examples/test-suite/java_throws.i +++ b/Examples/test-suite/java_throws.i @@ -183,7 +183,7 @@ try { // Need to handle the checked exception in NoExceptTest.delete() %typemap(javafinalize) SWIGTYPE %{ - @SuppressWarnings("deprecation") + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { try { delete(); diff --git a/Lib/java/java.swg b/Lib/java/java.swg index 1c1a56e69..c35876534 100644 --- a/Lib/java/java.swg +++ b/Lib/java/java.swg @@ -1304,7 +1304,7 @@ SWIG_JAVABODY_PROXY(protected, protected, SWIGTYPE) SWIG_JAVABODY_TYPEWRAPPER(protected, protected, protected, SWIGTYPE) %typemap(javafinalize) SWIGTYPE %{ - @SuppressWarnings("deprecation") + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } |