You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2018/11/15 20:33:49 UTC
svn commit: r1846677 -
/webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/LifecycleManagerImpl.java
Author: veithen
Date: Thu Nov 15 20:33:49 2018
New Revision: 1846677
URL: http://svn.apache.org/viewvc?rev=1846677&view=rev
Log:
AXIOM-493: Fix memory leak in LifecycleManagerImpl.
Patch provided by Mustafa Solmaz.
No regression test here because we would like to get rid of that class in a future Axiom version anyway.
This closes #2.
Modified:
webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/LifecycleManagerImpl.java
Modified: webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/LifecycleManagerImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/LifecycleManagerImpl.java?rev=1846677&r1=1846676&r2=1846677&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/LifecycleManagerImpl.java (original)
+++ webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/LifecycleManagerImpl.java Thu Nov 15 20:33:49 2018
@@ -88,7 +88,7 @@ public class LifecycleManagerImpl implem
}
if(file!=null && file.exists()){
- table.remove(file);
+ table.remove(file.getName());
if(log.isDebugEnabled()){
log.debug("invoking file.delete()");
}
@@ -135,7 +135,7 @@ public class LifecycleManagerImpl implem
log.debug("Invoking deleteOnExit() for file = "+file.getAbsolutePath());
}
hook.add(file);
- table.remove(file);
+ table.remove(file.getName());
}
if(log.isDebugEnabled()){
log.debug("End deleteOnExit()");
@@ -203,7 +203,7 @@ public class LifecycleManagerImpl implem
try{
Thread.sleep(interval*1000);
if(_file.exists()){
- table.remove(_file);
+ table.remove(_file.getName());
_file.delete();
}
}catch(InterruptedException e){