servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1400138 - /servicemix/smx4/specs/trunk/locator/src/main/java/org/apache/servicemix/specs/locator/Activator.java
Date Fri, 19 Oct 2012 15:56:07 GMT
Author: dkulp
Date: Fri Oct 19 15:56:07 2012
New Revision: 1400138

URL: http://svn.apache.org/viewvc?rev=1400138&view=rev
Log:
[SMX4-227] Ignore comment lines

Modified:
    servicemix/smx4/specs/trunk/locator/src/main/java/org/apache/servicemix/specs/locator/Activator.java

Modified: servicemix/smx4/specs/trunk/locator/src/main/java/org/apache/servicemix/specs/locator/Activator.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/locator/src/main/java/org/apache/servicemix/specs/locator/Activator.java?rev=1400138&r1=1400137&r2=1400138&view=diff
==============================================================================
--- servicemix/smx4/specs/trunk/locator/src/main/java/org/apache/servicemix/specs/locator/Activator.java
(original)
+++ servicemix/smx4/specs/trunk/locator/src/main/java/org/apache/servicemix/specs/locator/Activator.java
Fri Oct 19 15:56:07 2012
@@ -149,10 +149,19 @@ public class Activator implements Bundle
                         if (clazz == null){
                             debugPrintln("creating factory for key: " + factoryId);
                             BufferedReader br = new BufferedReader(new InputStreamReader(u.openStream(),
"UTF-8"));
-                            String factoryClassName = br.readLine();
-                            br.close();
-                            debugPrintln("factory implementation: " + factoryClassName);
-                            clazz = bundle.loadClass(factoryClassName);
+                            try {
+                                String factoryClassName = br.readLine();
+                                while (factoryClassName != null) {
+                                    factoryClassName = factoryClassName.trim();
+                                    if (factoryClassName.charAt(0) != '#') {
+                                        debugPrintln("factory implementation: " + factoryClassName);
+                                        clazz = bundle.loadClass(factoryClassName);
+                                        return clazz;
+                                    }
+                                }
+                            } finally {
+                                br.close();
+                            }
                         }
                     }
                 }



Mime
View raw message