cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1041143 - /cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
Date Wed, 01 Dec 2010 19:55:11 GMT
Author: dkulp
Date: Wed Dec  1 19:55:10 2010
New Revision: 1041143

URL: http://svn.apache.org/viewvc?rev=1041143&view=rev
Log:
Accidentally committed something that wasn't ready (and untested).  Fix
the tests.

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java?rev=1041143&r1=1041142&r2=1041143&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java Wed Dec  1
19:55:10 2010
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.phase;
 
+import java.lang.ref.WeakReference;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -238,8 +239,11 @@ public class PhaseInterceptorChain imple
         Message oldMessage = CURRENT_MESSAGE.get();
         try {
             CURRENT_MESSAGE.set(message);
-            if (oldMessage != null && !message.containsKey(PREVIOUS_MESSAGE)) {
-                message.put(PREVIOUS_MESSAGE, oldMessage);
+            if (oldMessage != null 
+                && !message.containsKey(PREVIOUS_MESSAGE)
+                && message != oldMessage
+                && message.getExchange() != oldMessage.getExchange()) {
+                message.put(PREVIOUS_MESSAGE, new WeakReference<Message>(oldMessage));
             }
             while (state == State.EXECUTING && iterator.hasNext()) {
                 try {



Mime
View raw message