aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tjwat...@apache.org
Subject svn commit: r1796179 - in /aries/branches/java6support/proxy: ./ proxy-impl/ proxy-impl/src/main/java/org/apache/aries/proxy/impl/common/ proxy-impl/src/main/java/org/apache/aries/proxy/impl/interfaces/ proxy-impl/src/test/java/org/apache/aries/bluepri...
Date Thu, 25 May 2017 18:10:21 GMT
Author: tjwatson
Date: Thu May 25 18:10:21 2017
New Revision: 1796179

URL: http://svn.apache.org/viewvc?rev=1796179&view=rev
Log:
Merge ^/aries/trunk/proxy r1794105 through r1796177 into java6support branch.

Added:
    aries/branches/java6support/proxy/proxy-impl/src/test/java/org/apache/aries/blueprint/proxy/complex/
      - copied from r1796177, aries/trunk/proxy/proxy-impl/src/test/java/org/apache/aries/blueprint/proxy/complex/
Modified:
    aries/branches/java6support/proxy/   (props changed)
    aries/branches/java6support/proxy/proxy-impl/pom.xml
    aries/branches/java6support/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/common/AbstractWovenProxyAdapter.java
    aries/branches/java6support/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/interfaces/InterfaceProxyGenerator.java
    aries/branches/java6support/proxy/proxy-impl/src/test/java/org/apache/aries/blueprint/proxy/InterfaceProxyingTest.java

Propchange: aries/branches/java6support/proxy/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 25 18:10:21 2017
@@ -1,2 +1,2 @@
 /aries/branches/1.0-prototype/proxy:1306564-1337594
-/aries/trunk/proxy:1728111-1794104
+/aries/trunk/proxy:1728111-1796177

Modified: aries/branches/java6support/proxy/proxy-impl/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/java6support/proxy/proxy-impl/pom.xml?rev=1796179&r1=1796178&r2=1796179&view=diff
==============================================================================
--- aries/branches/java6support/proxy/proxy-impl/pom.xml (original)
+++ aries/branches/java6support/proxy/proxy-impl/pom.xml Thu May 25 18:10:21 2017
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.aries</groupId>
         <artifactId>parent</artifactId>
-        <version>2.0.0</version>
+        <version>2.0.1</version>
         <relativePath>../../parent/pom.xml</relativePath>
     </parent>
 
@@ -32,7 +32,7 @@
     <artifactId>org.apache.aries.proxy</artifactId>
     <packaging>bundle</packaging>
     <name>Apache Aries Proxy Service</name>
-    <version>1.1.1-SNAPSHOT</version>
+    <version>1.1.2-SNAPSHOT</version>
     <description>
         This bundle contains the proxy service implementation for Apache Aries
     </description>
@@ -116,6 +116,18 @@
             <version>2.5.5</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>javax.transaction</groupId>
+            <artifactId>javax.transaction-api</artifactId>
+            <version>1.2</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-j2ee-connector_1.6_spec</artifactId>
+            <version>1.0</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <build>

Modified: aries/branches/java6support/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/common/AbstractWovenProxyAdapter.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/common/AbstractWovenProxyAdapter.java?rev=1796179&r1=1796178&r2=1796179&view=diff
==============================================================================
--- aries/branches/java6support/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/common/AbstractWovenProxyAdapter.java
(original)
+++ aries/branches/java6support/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/common/AbstractWovenProxyAdapter.java
Thu May 25 18:10:21 2017
@@ -600,7 +600,7 @@ public abstract class AbstractWovenProxy
 
     for (String methodStaticFieldName : transformedMethods.keySet()) {
       // add a private static field for the method
-      cv.visitField(ACC_PRIVATE | ACC_STATIC | ACC_FINAL | ACC_SYNTHETIC,
+      cv.visitField(ACC_PRIVATE | ACC_STATIC | ACC_SYNTHETIC,
           methodStaticFieldName, METHOD_TYPE.getDescriptor(), null, null)
           .visitEnd();
     }

Modified: aries/branches/java6support/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/interfaces/InterfaceProxyGenerator.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/interfaces/InterfaceProxyGenerator.java?rev=1796179&r1=1796178&r2=1796179&view=diff
==============================================================================
--- aries/branches/java6support/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/interfaces/InterfaceProxyGenerator.java
(original)
+++ aries/branches/java6support/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/interfaces/InterfaceProxyGenerator.java
Thu May 25 18:10:21 2017
@@ -124,9 +124,10 @@ public final class InterfaceProxyGenerat
           // second class is subclass of first one, it occurs later in hierarchy
           return 1;
         }
-        // types have separate inheritance trees, so it doesn't mater which one is first
or second,
+        // types have separate inheritance trees, but it does matter which one is first or
second, so we
+        // won't end up with duplicates
         // however we can't mark them as equal cause one of them will be removed
-        return 1;
+        return object1.getName().compareTo(object2.getName());
       }
     });
     for(Class<?> c : ifaces) {

Modified: aries/branches/java6support/proxy/proxy-impl/src/test/java/org/apache/aries/blueprint/proxy/InterfaceProxyingTest.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/proxy/proxy-impl/src/test/java/org/apache/aries/blueprint/proxy/InterfaceProxyingTest.java?rev=1796179&r1=1796178&r2=1796179&view=diff
==============================================================================
--- aries/branches/java6support/proxy/proxy-impl/src/test/java/org/apache/aries/blueprint/proxy/InterfaceProxyingTest.java
(original)
+++ aries/branches/java6support/proxy/proxy-impl/src/test/java/org/apache/aries/blueprint/proxy/InterfaceProxyingTest.java
Thu May 25 18:10:21 2017
@@ -33,11 +33,14 @@ import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.Callable;
 
 import org.apache.aries.blueprint.proxy.AbstractProxyTest.TestListener;
+import org.apache.aries.blueprint.proxy.complex.AriesTransactionManager;
+import org.apache.aries.proxy.UnableToProxyException;
 import org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator;
 import org.junit.Before;
 import org.junit.Test;
@@ -276,6 +279,18 @@ public class InterfaceProxyingTest {
       assertTrue("parents should be different, as the are the classloaders of different bundle
revisions", parent1 != parent2);
   }
 
+
+  // Test for https://issues.apache.org/jira/browse/ARIES-1618
+  @Test
+  public void checkDuplicateInterfaces() throws UnableToProxyException
+  {
+    Collection<Class<?>> classes = Collections.<Class<?>>singletonList(AriesTransactionManager.class);
+
+    Object o = InterfaceProxyGenerator.getProxyInstance(testBundle, null, classes, constantly(null),
null);
+
+    assertTrue(o instanceof AriesTransactionManager);
+  }
+
   protected void assertCalled(TestListener listener, boolean pre, boolean post, boolean ex)
{
     assertEquals(pre, listener.preInvoke);
     assertEquals(post, listener.postInvoke);



Mime
View raw message