Applied the patch from Robert Lillack fixing FELIX-2981.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1180386 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/core/src/main/java/org/apache/felix/ipojo/util/Property.java b/ipojo/core/src/main/java/org/apache/felix/ipojo/util/Property.java
index c2d457f..1bcb0eb 100644
--- a/ipojo/core/src/main/java/org/apache/felix/ipojo/util/Property.java
+++ b/ipojo/core/src/main/java/org/apache/felix/ipojo/util/Property.java
@@ -303,10 +303,6 @@
* @return the default value.
*/
public Object getDefaultValue() {
- if (m_defaultValue == NO_VALUE) {
- return getNoValue(m_type);
- }
-
return m_defaultValue;
}
@@ -364,7 +360,7 @@
* @return <code>true</code> if the object is assignable in the property of type 'type'.
*/
public static boolean isAssignable(Class type, Object value) {
- if (value == null || type.isInstance(value)) { // When the value is null, the assign works necessary.
+ if (value == null || type.isInstance(value) || value == Property.NO_VALUE) { // When the value is null, the assign works necessary.
return true;
} else if (type.isPrimitive()) {
// Manage all boxing types.