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 2020/04/17 12:28:22 UTC
[felix-dev] branch master updated: FELIX-6261 : [Regression] Empty
property values are treated as String arrays
This is an automated email from the ASF dual-hosted git repository.
cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-dev.git
The following commit(s) were added to refs/heads/master by this push:
new f9129c0 FELIX-6261 : [Regression] Empty property values are treated as String arrays
f9129c0 is described below
commit f9129c067ca70c2de6fa6373c5fda73705855b67
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Apr 17 14:28:09 2020 +0200
FELIX-6261 : [Regression] Empty property values are treated as String arrays
---
scr/changelog.txt | 6 ++++++
scr/src/main/java/org/apache/felix/scr/impl/xml/XmlHandler.java | 8 ++------
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/scr/changelog.txt b/scr/changelog.txt
index dcf9722..7b64209 100644
--- a/scr/changelog.txt
+++ b/scr/changelog.txt
@@ -1,3 +1,9 @@
+Changes in 2.1.20
+-----------------
+** Bug
+ * [FELIX-6261] - [Regression] Empty property values are treated as String arrays
+
+
Changes in 2.1.18
-----------------
** Bug
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/xml/XmlHandler.java b/scr/src/main/java/org/apache/felix/scr/impl/xml/XmlHandler.java
index 0d461fd..948d819 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/xml/XmlHandler.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/xml/XmlHandler.java
@@ -463,10 +463,8 @@ public class XmlHandler extends DefaultHandler
if (propertyBuilder != null) {
m_pendingProperty.setValues(propertyBuilder.toString());
propertyBuilder = null;
- } else {
- m_pendingProperty.setValues("");
+ m_currentComponent.addProperty( m_pendingProperty );
}
- m_currentComponent.addProperty( m_pendingProperty );
m_pendingProperty = null;
}
else if ( localName.equals( XmlConstants.EL_FACTORY_PROPERTY ) && m_pendingFactoryProperty != null )
@@ -474,10 +472,8 @@ public class XmlHandler extends DefaultHandler
if (propertyBuilder != null) {
m_pendingFactoryProperty.setValues(propertyBuilder.toString());
propertyBuilder = null;
- } else {
- m_pendingFactoryProperty.setValues("");
+ m_currentComponent.addFactoryProperty( m_pendingFactoryProperty );
}
- m_currentComponent.addFactoryProperty( m_pendingFactoryProperty );
m_pendingFactoryProperty = null;
}
}