remove try/catch block from finalize methods

pull/10/head
Chris Conlon 2016-10-18 14:40:15 -06:00
parent 5bff67d62c
commit 2a7997da29
2 changed files with 10 additions and 20 deletions

View File

@ -1544,17 +1544,12 @@ public class WolfSSLContext {
@Override
protected void finalize() throws Throwable
{
try {
if (this.active == true) {
/* free resources, set state */
this.free();
this.active = false;
}
} catch (Throwable t) {
throw t;
} finally {
super.finalize();
if (this.active == true) {
/* free resources, set state */
this.free();
this.active = false;
}
super.finalize();
}
} /* end WolfSSLContext */

View File

@ -2109,17 +2109,12 @@ public class WolfSSLSession {
@Override
protected void finalize() throws Throwable
{
try {
if (this.active == true) {
/* free resources, set state */
this.freeSSL();
this.active = false;
}
} catch (Throwable t) {
throw t;
} finally {
super.finalize();
if (this.active == true) {
/* free resources, set state */
this.freeSSL();
this.active = false;
}
super.finalize();
}
} /* end WolfSSLSession */