* Fix FELIX-1427
Service dependencies are not able to be injected as smart proxies (generated in bytecode). However the proxies ensure the service object set synchronization.
By default fields now receive proxies (default behavior can be set with the ipojo.depednency.proxy-enabled|disabled system property).

* Fix an interception bug on constructors

* Fix import / package packages of composites and temporal handler as now the core embeds ASM

* Add a classloading issue in the temporal dependencies (Bad classloader)



git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@893960 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCreator.java b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCreator.java
index 4d0b960..a80105d 100644
--- a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCreator.java
+++ b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCreator.java
@@ -316,7 +316,6 @@
             }

         }

         

-        

         mv.visitMaxs(0, 0);

         mv.visitEnd();

     }

@@ -348,7 +347,7 @@
                 ad.visit(mv);

             }

         }

-        

+

         mv.visitMaxs(0, 0);

         mv.visitEnd();

     }

@@ -657,7 +656,6 @@
         }

 

         mv.visitLabel(endif2);

-

         mv.visitInsn(RETURN);

 

         mv.visitMaxs(0, 0);

diff --git a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/annotations/FieldCollector.java b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/annotations/FieldCollector.java
index 6dc24c7..3bd0fb5 100644
--- a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/annotations/FieldCollector.java
+++ b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/annotations/FieldCollector.java
@@ -157,6 +157,11 @@
         private String m_from;

         

         /**

+         * Proxy attribute.

+         */

+        private String m_proxy;

+        

+        /**

          * Constructor.

          * @param name : field name.

          */

@@ -209,6 +214,10 @@
                 m_from = arg1.toString();

                 return;

             }

+            if (arg0.equals("proxy")) {

+                m_proxy = arg1.toString();

+                return;

+            }

         }

 

         /**

@@ -256,6 +265,9 @@
             if (m_from != null) {

                 req.addAttribute(new Attribute("from", m_from));

             }

+            if (m_proxy != null) {

+                req.addAttribute(new Attribute("proxy", m_proxy));

+            }

             

             if (m_id != null) { 

                 m_collector.getIds().put(m_id, req);

diff --git a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/annotations/MethodCollector.java b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/annotations/MethodCollector.java
index 856218e..d288b94 100644
--- a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/annotations/MethodCollector.java
+++ b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/annotations/MethodCollector.java
@@ -211,7 +211,7 @@
          * From attribute.
          */
         private String m_from;
-
+        
         /**
          * Constructor.
          * @param bind : method name.
@@ -379,7 +379,6 @@
                         System.err.println("The from attribute is not always the same");
                         return;
                     }
-                    
                 }
                 
             }
diff --git a/ipojo/manipulator/src/main/resources/core.xsd b/ipojo/manipulator/src/main/resources/core.xsd
index 2f3491f..5d51779 100644
--- a/ipojo/manipulator/src/main/resources/core.xsd
+++ b/ipojo/manipulator/src/main/resources/core.xsd
@@ -260,6 +260,13 @@
                       <xs:documentation>Specific service provider. The dependency can only be fulfilled by the component with the matching name, or by the service with a matching PID.</xs:documentation>
                     </xs:annotation>
         </xs:attribute>
+        
+        <xs:attribute name="proxy" type="xs:boolean"
+          use="optional">
+                    <xs:annotation>
+                      <xs:documentation>Enables or Disable the proxy injection (on field injection)</xs:documentation>
+                    </xs:annotation>
+        </xs:attribute>
 
         <xs:attribute name="scope" use="optional">
           <xs:simpleType>