You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2015/01/20 20:22:04 UTC
svn commit: r1653342 -
/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/metadata/ReferenceMetadata.java
Author: cziegeler
Date: Tue Jan 20 19:22:04 2015
New Revision: 1653342
URL: http://svn.apache.org/r1653342
Log:
FELIX-4631 : [DS][R6/RFC212] Implement field injection. Update to latest spec status , reference can use field and bind at the same time
Modified:
felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/metadata/ReferenceMetadata.java
Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/metadata/ReferenceMetadata.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/metadata/ReferenceMetadata.java?rev=1653342&r1=1653341&r2=1653342&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/metadata/ReferenceMetadata.java (original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/metadata/ReferenceMetadata.java Tue Jan 20 19:22:04 2015
@@ -667,14 +667,11 @@ public class ReferenceMetadata
}
// 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 @@ public class ReferenceMetadata
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 @@ public class ReferenceMetadata
}
}
- // static references only allow replace strateg
+ // static references only allow replace strategy
if ( m_isStatic )
{
if ( ! m_field_option.equals(FIELD_STRATEGY_REPLACE) )