[Java] Suppress deprecation warning on finalize method

Java 9 deprecates the finalize method.
For now just suppress the deprecation warning.
Fixes #1237
This commit is contained in:
Sylvain Joubert 2018-04-23 13:57:19 +02:00
commit db34df38f3
3 changed files with 3 additions and 0 deletions

View file

@ -7,6 +7,7 @@
%module(directors="1") java_director
%typemap(javafinalize) SWIGTYPE %{
@SuppressWarnings("deprecation")
protected void finalize() {
// System.out.println("Finalizing " + this);
delete();

View file

@ -192,6 +192,7 @@ try {
// Need to handle the checked exception in NoExceptTest.delete()
%typemap(javafinalize) SWIGTYPE %{
@SuppressWarnings("deprecation")
protected void finalize() {
try {
delete();

View file

@ -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();
}