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 2020/12/05 20:29:14 UTC
[tapestry-5] 03/03: 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 java9modules
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git
commit 05b6bdc13540da439db61d9ef838bdd20cad3250
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 5873547..11d13eb 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.commons.ObjectLocator;
import org.apache.tapestry5.ioc.MethodAdviceReceiver;
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 88e7015..72d4d24 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
@@ -977,7 +977,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())
{