cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1578107 - /cayenne/main/trunk/cayenne-di/src/main/java/org/apache/cayenne/di/spi/Binding.java
Date Sun, 16 Mar 2014 15:39:53 GMT
Author: aadamchik
Date: Sun Mar 16 15:39:52 2014
New Revision: 1578107

URL: http://svn.apache.org/r1578107
Log:
suspect event listener leak

Modified:
    cayenne/main/trunk/cayenne-di/src/main/java/org/apache/cayenne/di/spi/Binding.java

Modified: cayenne/main/trunk/cayenne-di/src/main/java/org/apache/cayenne/di/spi/Binding.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-di/src/main/java/org/apache/cayenne/di/spi/Binding.java?rev=1578107&r1=1578106&r2=1578107&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-di/src/main/java/org/apache/cayenne/di/spi/Binding.java (original)
+++ cayenne/main/trunk/cayenne-di/src/main/java/org/apache/cayenne/di/spi/Binding.java Sun
Mar 16 15:39:52 2014
@@ -48,6 +48,9 @@ class Binding<T> {
             scope = NoScope.INSTANCE;
         }
 
+        // TODO: what happens to the old scoped value? Seems like this leaks
+        // scope event listeners and may cause unexpected events...
+        
         this.scoped = scope.scope(original);
         this.scope = scope;
     }
@@ -63,8 +66,12 @@ class Binding<T> {
         for (DecoratorProvider<T> decoratorProvider : decorators) {
             provider = decoratorProvider.get(provider);
         }
-        
+
         this.decorated = provider;
+
+        // TODO: what happens to the old scoped value? Seems like this leaks
+        // scope event listeners and may cause unexpected events...
+
         this.scoped = scope.scope(decorated);
     }
 



Mime
View raw message