commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1719524 - /commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/WeaveProcessor.java
Date Fri, 11 Dec 2015 20:08:12 GMT
Author: mbenson
Date: Fri Dec 11 20:08:12 2015
New Revision: 1719524

URL: http://svn.apache.org/viewvc?rev=1719524&view=rev
Log:
account for the case in which Weavers are installed on the same CP as the cw-processor in
addition to TCCL

Modified:
    commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/WeaveProcessor.java

Modified: commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/WeaveProcessor.java
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/WeaveProcessor.java?rev=1719524&r1=1719523&r2=1719524&view=diff
==============================================================================
--- commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/WeaveProcessor.java
(original)
+++ commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/WeaveProcessor.java
Fri Dec 11 20:08:12 2015
@@ -49,6 +49,11 @@ public class WeaveProcessor {
 
     static {
         final List<Weaver> weavers = new ArrayList<Weaver>();
+        if (!Thread.currentThread().getContextClassLoader().equals(Weaver.class.getClassLoader()))
{
+            for (final Weaver weaver : ServiceLoader.load(Weaver.class, Weaver.class.getClassLoader()))
{
+                weavers.add(weaver);
+            }
+        }
         for (final Weaver weaver : ServiceLoader.load(Weaver.class)) {
             weavers.add(weaver);
         }



Mime
View raw message