felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1072066 - /felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/PropertyHandler.java
Date Fri, 18 Feb 2011 17:08:32 GMT
Author: cziegeler
Date: Fri Feb 18 17:08:32 2011
New Revision: 1072066

URL: http://svn.apache.org/viewvc?rev=1072066&view=rev
Log:
FELIX-2835 : SCR plugin: Parsing of "options" for property tag broken for javadoc annotations

Modified:
    felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/PropertyHandler.java

Modified: felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/PropertyHandler.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/PropertyHandler.java?rev=1072066&r1=1072065&r2=1072066&view=diff
==============================================================================
--- felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/PropertyHandler.java
(original)
+++ felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/PropertyHandler.java
Fri Feb 18 17:08:32 2011
@@ -169,12 +169,15 @@ public class PropertyHandler {
                 if (Constants.PROPERTY_OPTIONS.equals(parameters[j])) {
                     options = new LinkedHashMap<String, String>();
                 } else if (options != null) {
-                    String optionLabel = parameters[j];
-                    String optionValue = (j < parameters.length-2) ? parameters[j+2] :
null;
-                    if (optionValue != null) {
-                        options.put(optionLabel, optionValue);
+                    final String option = parameters[j];
+                    final int pos = option.indexOf('=');
+                    if ( pos != -1 ) {
+                        String optionLabel = option.substring(0, pos);
+                        String optionValue = option.substring(pos + 1);
+                        if (optionValue != null && optionValue.length() > 0 )
{
+                            options.put(optionLabel, optionValue);
+                        }
                     }
-                    j += 2;
                 }
             }
             ad.setOptions(options);



Mime
View raw message