You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2016/02/18 00:11:04 UTC
[29/33] incubator-geode git commit: Fixing a suspect NPE string
Fixing a suspect NPE string
Once in a while a test fails with an NPE in method
Connection.scheduleAckTimeouts() using the variable ackConnectionGroup.
This variable is set to null in setInUse().
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/d632bfb7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/d632bfb7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/d632bfb7
Branch: refs/heads/feature/GEODE-831
Commit: d632bfb73155673b2ee06be0e3657033901e114d
Parents: 23edf7e
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Wed Feb 17 07:51:56 2016 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Wed Feb 17 07:51:56 2016 -0800
----------------------------------------------------------------------
.../main/java/com/gemstone/gemfire/internal/tcp/Connection.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d632bfb7/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
index 74660da..988ca33 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
@@ -2673,11 +2673,12 @@ public class Connection implements Runnable {
}
}
}
- if (sentAlert) {
+ List group = ackConnectionGroup;
+ if (sentAlert && group != null) {
// since transmission and ack-receipt are performed serially, we don't
// want to complain about all receivers out just because one was slow. We therefore reset
// the time stamps and give others more time
- for (Iterator it=ackConnectionGroup.iterator(); it.hasNext(); ) {
+ for (Iterator it=group.iterator(); it.hasNext(); ) {
Connection con = (Connection)it.next();
if (con != Connection.this) {
con.transmissionStartTime += con.ackSATimeout;