You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by th...@apache.org on 2021/02/11 22:51:34 UTC
[tapestry-5] 02/02: TAP5-2636: Tapestry-IoC shouldn't accept
advisers with the same id
This is an automated email from the ASF dual-hosted git repository.
thiagohp pushed a commit to branch 5.6.x
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git
commit 963ede88c15c19af2b3221aad8653b1e64889faf
Author: Thiago H. de Paula Figueiredo <th...@arsmachina.com.br>
AuthorDate: Tue Dec 1 23:45:47 2020 -0300
TAP5-2636: Tapestry-IoC shouldn't accept advisers with the same id
---
.../src/main/java/org/apache/tapestry5/jcache/module/JCacheModule.java | 2 ++
.../src/main/java/org/apache/tapestry5/ioc/internal/RegistryImpl.java | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/tapestry-ioc-jcache/src/main/java/org/apache/tapestry5/jcache/module/JCacheModule.java b/tapestry-ioc-jcache/src/main/java/org/apache/tapestry5/jcache/module/JCacheModule.java
index 00fa94b..66705b2 100644
--- a/tapestry-ioc-jcache/src/main/java/org/apache/tapestry5/jcache/module/JCacheModule.java
+++ b/tapestry-ioc-jcache/src/main/java/org/apache/tapestry5/jcache/module/JCacheModule.java
@@ -26,6 +26,7 @@ import javax.cache.annotation.CacheResult;
import org.apache.tapestry5.ioc.MethodAdviceReceiver;
import org.apache.tapestry5.ioc.ObjectLocator;
import org.apache.tapestry5.ioc.ServiceBinder;
+import org.apache.tapestry5.ioc.annotations.Advise;
import org.apache.tapestry5.ioc.annotations.Match;
import org.apache.tapestry5.jcache.internal.CacheLookupUtil;
import org.apache.tapestry5.jcache.internal.CacheMethodAdvice;
@@ -70,6 +71,7 @@ public final class JCacheModule
* an {@link ObjectLocator}.
*/
@Match("*")
+ @Advise(id = "JCache")
public static void adviseCache(MethodAdviceReceiver receiver, ObjectLocator objectLocator)
{
advise(CachePut.class, objectLocator, CachePutMethodAdvice.class, receiver);
diff --git a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/RegistryImpl.java b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/RegistryImpl.java
index 2ebf962..ff270bd 100644
--- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/RegistryImpl.java
+++ b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/RegistryImpl.java
@@ -949,7 +949,7 @@ public class RegistryImpl implements Registry, InternalRegistry, ServiceProxyPro
Logger logger = getServiceLogger(serviceDef.getServiceId());
- Orderer<ServiceAdvisor> orderer = new Orderer<ServiceAdvisor>(logger);
+ Orderer<ServiceAdvisor> orderer = new Orderer<ServiceAdvisor>(logger, true);
for (Module module : moduleToServiceDefs.keySet())
{