[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:
parent
d612c6a835
commit
db34df38f3
3 changed files with 3 additions and 0 deletions
|
|
@ -7,6 +7,7 @@
|
|||
%module(directors="1") java_director
|
||||
|
||||
%typemap(javafinalize) SWIGTYPE %{
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
// System.out.println("Finalizing " + this);
|
||||
delete();
|
||||
|
|
|
|||
|
|
@ -192,6 +192,7 @@ try {
|
|||
|
||||
// Need to handle the checked exception in NoExceptTest.delete()
|
||||
%typemap(javafinalize) SWIGTYPE %{
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
try {
|
||||
delete();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue