FELIX-4631 : [DS][R6/RFC212] Implement field injection. Update to latest spec status , reference can use field and bind at the same time

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1653342 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/metadata/ReferenceMetadata.java b/scr/src/main/java/org/apache/felix/scr/impl/metadata/ReferenceMetadata.java
index 9c0e198..9636f83 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/metadata/ReferenceMetadata.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/metadata/ReferenceMetadata.java
@@ -667,14 +667,11 @@
         }
 
         // checks for event based injection
-        if ( m_field == null )
+        // updated method is only supported in namespace xxx and later
+        if ( m_updated != null && !(dsVersion.isDS12() || dsVersion == DSVersion.DS11Felix) )
         {
-            // updated method is only supported in namespace xxx and later
-            if ( m_updated != null && !(dsVersion.isDS12() || dsVersion == DSVersion.DS11Felix) )
-            {
-                // FELIX-3648 validation must fail (instead of just ignore)
-                throw componentMetadata.validationFailure( "updated method declaration requires DS 1.2 or later namespace " );
-            }
+            // FELIX-3648 validation must fail (instead of just ignore)
+            throw componentMetadata.validationFailure( "updated method declaration requires DS 1.2 or later namespace " );
         }
 
         // checks for field injection
@@ -686,12 +683,6 @@
                 throw componentMetadata.validationFailure( "Field reference requires DS >= 1.3" );
             }
 
-            // check for bind/unbind/updated
-            if ( m_bind != null || m_unbind != null || m_updated != null )
-            {
-                throw componentMetadata.validationFailure( "Bind/unbind/updated should not be specified with a field reference" );
-            }
-
             // field strategy
             if ( m_field_option == null )
             {
@@ -731,7 +722,7 @@
                 }
             }
 
-            // static references only allow replace strateg
+            // static references only allow replace strategy
             if ( m_isStatic )
             {
                 if ( ! m_field_option.equals(FIELD_STRATEGY_REPLACE) )