commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject commons-pool git commit: The local variable snapshot was hiding the snapshot field from 'this'.
Date Wed, 01 Nov 2017 15:21:24 GMT
Repository: commons-pool
Updated Branches:
  refs/heads/master 305c48ab5 -> 3a09397eb


The local variable snapshot was hiding the snapshot field from 'this'.

Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/3a09397e
Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/3a09397e
Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/3a09397e

Branch: refs/heads/master
Commit: 3a09397eb7e60e49a677eae0bc221ce12f03220f
Parents: 305c48a
Author: Gary Gregory <ggregory@apache.org>
Authored: Wed Nov 1 09:21:22 2017 -0600
Committer: Gary Gregory <ggregory@apache.org>
Committed: Wed Nov 1 09:21:22 2017 -0600

----------------------------------------------------------------------
 .../apache/commons/pool2/impl/SecurityManagerCallStack.java  | 8 ++++----
 .../org/apache/commons/pool2/impl/ThrowableCallStack.java    | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-pool/blob/3a09397e/src/main/java/org/apache/commons/pool2/impl/SecurityManagerCallStack.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/pool2/impl/SecurityManagerCallStack.java b/src/main/java/org/apache/commons/pool2/impl/SecurityManagerCallStack.java
index c4f2ae0..83110d4 100644
--- a/src/main/java/org/apache/commons/pool2/impl/SecurityManagerCallStack.java
+++ b/src/main/java/org/apache/commons/pool2/impl/SecurityManagerCallStack.java
@@ -62,8 +62,8 @@ public class SecurityManagerCallStack implements CallStack {
 
     @Override
     public boolean printStackTrace(final PrintWriter writer) {
-        final Snapshot snapshot = this.snapshot;
-        if (snapshot == null) {
+        final Snapshot snapshotRef = this.snapshot;
+        if (snapshotRef == null) {
             return false;
         }
         final String message;
@@ -71,11 +71,11 @@ public class SecurityManagerCallStack implements CallStack {
             message = messageFormat;
         } else {
             synchronized (dateFormat) {
-                message = dateFormat.format(snapshot.timestamp);
+                message = dateFormat.format(snapshotRef.timestamp);
             }
         }
         writer.println(message);
-        for (final WeakReference<Class<?>> reference : snapshot.stack) {
+        for (final WeakReference<Class<?>> reference : snapshotRef.stack) {
             writer.println(reference.get());
         }
         return true;

http://git-wip-us.apache.org/repos/asf/commons-pool/blob/3a09397e/src/main/java/org/apache/commons/pool2/impl/ThrowableCallStack.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/pool2/impl/ThrowableCallStack.java b/src/main/java/org/apache/commons/pool2/impl/ThrowableCallStack.java
index f6997a1..fe338ec 100644
--- a/src/main/java/org/apache/commons/pool2/impl/ThrowableCallStack.java
+++ b/src/main/java/org/apache/commons/pool2/impl/ThrowableCallStack.java
@@ -49,8 +49,8 @@ public class ThrowableCallStack implements CallStack {
 
     @Override
     public synchronized boolean printStackTrace(final PrintWriter writer) {
-        final Snapshot snapshot = this.snapshot;
-        if (snapshot == null) {
+        final Snapshot snapshotRef = this.snapshot;
+        if (snapshotRef == null) {
             return false;
         }
         final String message;
@@ -58,11 +58,11 @@ public class ThrowableCallStack implements CallStack {
             message = messageFormat;
         } else {
             synchronized (dateFormat) {
-                message = dateFormat.format(snapshot.timestamp);
+                message = dateFormat.format(snapshotRef.timestamp);
             }
         }
         writer.println(message);
-        snapshot.printStackTrace(writer);
+        snapshotRef.printStackTrace(writer);
         return true;
     }
 


Mime
View raw message