mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-4182 - remove remaining use of finalize()
This commit is contained in:
parent
f70dc74312
commit
ec35588e56
|
@ -145,16 +145,11 @@ public class TransportLogger extends TransportFilter {
|
||||||
return next.toString();
|
return next.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
/**
|
public void stop() throws Exception {
|
||||||
* We need to override this method
|
super.stop();
|
||||||
* so that we can unregister the associated
|
|
||||||
* MBean to avoid a memory leak.
|
|
||||||
*/
|
|
||||||
public void finalize() throws Throwable {
|
|
||||||
if (view != null) {
|
if (view != null) {
|
||||||
view.unregister();
|
view.unregister();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1627,14 +1627,6 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
|
||||||
started.set(false);
|
started.set(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void finalize() throws Throwable{
|
|
||||||
Scheduler s = this.scheduler;
|
|
||||||
if (s != null){
|
|
||||||
s.stop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changes the associated username/password that is associated with this
|
* Changes the associated username/password that is associated with this
|
||||||
* connection. If the connection has been used, you must called cleanup()
|
* connection. If the connection has been used, you must called cleanup()
|
||||||
|
|
Loading…
Reference in New Issue