felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r911325 - /felix/trunk/metatype/src/main/java/org/apache/felix/metatype/DefaultMetaTypeProvider.java
Date Thu, 18 Feb 2010 11:01:46 GMT
Author: fmeschbe
Date: Thu Feb 18 11:01:46 2010
New Revision: 911325

URL: http://svn.apache.org/viewvc?rev=911325&view=rev
Log:
FELIX-2097 do not return an empty locale name from the DefaultMetaTypeProvider.getLocales()
method

Modified:
    felix/trunk/metatype/src/main/java/org/apache/felix/metatype/DefaultMetaTypeProvider.java

Modified: felix/trunk/metatype/src/main/java/org/apache/felix/metatype/DefaultMetaTypeProvider.java
URL: http://svn.apache.org/viewvc/felix/trunk/metatype/src/main/java/org/apache/felix/metatype/DefaultMetaTypeProvider.java?rev=911325&r1=911324&r2=911325&view=diff
==============================================================================
--- felix/trunk/metatype/src/main/java/org/apache/felix/metatype/DefaultMetaTypeProvider.java
(original)
+++ felix/trunk/metatype/src/main/java/org/apache/felix/metatype/DefaultMetaTypeProvider.java
Thu Feb 18 11:01:46 2010
@@ -1,4 +1,4 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -32,7 +32,6 @@
 import org.osgi.framework.Bundle;
 import org.osgi.framework.Constants;
 import org.osgi.service.metatype.MetaTypeProvider;
-import org.osgi.service.metatype.MetaTypeService;
 import org.osgi.service.metatype.ObjectClassDefinition;
 
 
@@ -43,7 +42,7 @@
  * <p>
  * This class may be used by clients, e.g. <code>ManagedService</code> or
  * <code>ManagedServiceFactory</code> implementations to easily also implement
- * the <code>MetaTypeProvider</code> interface. 
+ * the <code>MetaTypeProvider</code> interface.
  *
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
@@ -52,7 +51,7 @@
 
     private final Bundle bundle;
     private final String localePrefix;
-    
+
     private Map objectClassDefinitions;
     private Map designates;
     private Map locales;
@@ -137,7 +136,9 @@
                 {
                     name = name.substring( 1 );
                 }
-                locales.put( name, url );
+                if (name.length() > 0) {
+                    locales.put( name, url );
+                }
             }
         }
 
@@ -178,7 +179,7 @@
     {
         return ( Designate ) designates.get( pid );
     }
-    
+
     protected Map getObjectClassDefinitions()
     {
         return objectClassDefinitions;



Mime
View raw message