commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r744932 - /commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/AbandonedTrace.java
Date Mon, 16 Feb 2009 15:12:54 GMT
Author: psteitz
Date: Mon Feb 16 15:12:51 2009
New Revision: 744932

URL: http://svn.apache.org/viewvc?rev=744932&view=rev
Log:
Eliminated unused private field.  JIRA: DBCP-255

Modified:
    commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/AbandonedTrace.java

Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/AbandonedTrace.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/AbandonedTrace.java?rev=744932&r1=744931&r2=744932&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/AbandonedTrace.java (original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/AbandonedTrace.java Mon Feb
16 15:12:51 2009
@@ -43,8 +43,6 @@
 
     /** DBCP AbandonedConfig */
     private AbandonedConfig config = null;
-    /**  Parent object */
-    private volatile AbandonedTrace parent;
     /** A stack trace of the code that created me (if in debug mode) */
     private volatile Exception createdBy;
     /** Time created */
@@ -59,7 +57,7 @@
      * without doing abandoned tracing.
      */
     public AbandonedTrace() {
-        init(parent);
+        init(null);
     }
 
     /**
@@ -69,7 +67,7 @@
      */
     public AbandonedTrace(AbandonedConfig config) {
         this.config = config;
-        init(parent);
+        init(null);
     }
 
     /**
@@ -116,9 +114,6 @@
      * @return long time in ms
      */
     protected long getLastUsed() {
-        if (parent != null) {     
-           return parent.getLastUsed();  
-        }
         return lastUsed;
     }
 
@@ -127,11 +122,7 @@
      * current time in ms.
      */
     protected void setLastUsed() {
-        if (parent != null) {
-           parent.setLastUsed();
-        } else {
-           lastUsed = System.currentTimeMillis();
-        }
+        lastUsed = System.currentTimeMillis();
     }
 
     /**
@@ -140,11 +131,7 @@
      * @param time time in ms
      */
     protected void setLastUsed(long time) {
-        if (parent != null) {
-           parent.setLastUsed(time);
-        } else {   
-           lastUsed = time;
-        }
+        lastUsed = time;
     }
 
     /**
@@ -160,9 +147,6 @@
             createdBy = new Exception();
             createdTime = System.currentTimeMillis();
         }
-        if (parent != null) {                  
-            parent.addTrace(this);
-        }
     }
 
     /**



Mime
View raw message