felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apan...@apache.org
Subject svn commit: r1445590 - in /felix/trunk/webconsole-plugins/servicediagnostics: ./ core/ core/src/main/scala/servicediagnostics/impl/ core/src/main/scala/servicediagnostics/webconsole/ sample/
Date Wed, 13 Feb 2013 13:31:45 GMT
Author: apanday
Date: Wed Feb 13 13:31:45 2013
New Revision: 1445590

URL: http://svn.apache.org/r1445590
Log:
FELIX-3898 (name parsing on BundleDependency) and FELIX-3899 (switch to Scala 2.1O)

Modified:
    felix/trunk/webconsole-plugins/servicediagnostics/changelog.txt
    felix/trunk/webconsole-plugins/servicediagnostics/core/pom.xml
    felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/impl/DMNotAvail.scala
    felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/impl/DSNotAvail.scala
    felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/webconsole/WebConsolePlugin.scala
    felix/trunk/webconsole-plugins/servicediagnostics/run.sh
    felix/trunk/webconsole-plugins/servicediagnostics/sample/pom.xml

Modified: felix/trunk/webconsole-plugins/servicediagnostics/changelog.txt
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/servicediagnostics/changelog.txt?rev=1445590&r1=1445589&r2=1445590&view=diff
==============================================================================
--- felix/trunk/webconsole-plugins/servicediagnostics/changelog.txt (original)
+++ felix/trunk/webconsole-plugins/servicediagnostics/changelog.txt Wed Feb 13 13:31:45 2013
@@ -1,4 +1,13 @@
-Changes from 0.1.1 to 0.2.0
+Changes from 0.1.2 to 0.1.3
+---------------------------
+
+** Bug
+  * [FELIX-3898] name parsing issue on BundleDependency
+
+** Improvement
+  * [FELIX-3899] switch to Scala 2.10
+
+Changes from 0.1.1 to 0.1.2
 ---------------------------
 
 ** Bug

Modified: felix/trunk/webconsole-plugins/servicediagnostics/core/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/servicediagnostics/core/pom.xml?rev=1445590&r1=1445589&r2=1445590&view=diff
==============================================================================
--- felix/trunk/webconsole-plugins/servicediagnostics/core/pom.xml (original)
+++ felix/trunk/webconsole-plugins/servicediagnostics/core/pom.xml Wed Feb 13 13:31:45 2013
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.apache.felix</groupId>
     <artifactId>servicediagnostics.parent</artifactId>
-    <version>0.1.2</version>
+    <version>0.1.3-SNAPSHOT</version>
     <relativePath>../parent/pom.xml</relativePath>
   </parent>
 
@@ -37,7 +37,7 @@
     <dependency>
       <groupId>org.scala-lang</groupId>
       <artifactId>scala-library</artifactId>
-      <version>2.9.1</version>
+      <version>2.10.0</version>
       <scope>provided</scope>
     </dependency>
     <dependency>

Modified: felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/impl/DMNotAvail.scala
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/impl/DMNotAvail.scala?rev=1445590&r1=1445589&r2=1445590&view=diff
==============================================================================
--- felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/impl/DMNotAvail.scala
(original)
+++ felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/impl/DMNotAvail.scala
Wed Feb 13 13:31:45 2013
@@ -49,8 +49,8 @@ class DMNotAvail(val bc:BundleContext) e
             comp <- dm.getComponents.map(_.asInstanceOf[Component])
             compdec = comp.asInstanceOf[ComponentDeclaration]
             deps = compdec.getComponentDependencies
-                          .map(dep => new Dependency(dep.getName.takeWhile(_ != ' '),

-                                           dep.getName.dropWhile(_ != ' ').trim,
+                          .map(dep => new Dependency(dep.getName.takeWhile(_ != '('),

+                                           dep.getName.dropWhile(_ != '(').trim,
                                            dep.getState != STATE_UNAVAILABLE_REQUIRED)).toList
           }
             // yield Comp builds a list of Comp out of the for comprehension

Modified: felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/impl/DSNotAvail.scala
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/impl/DSNotAvail.scala?rev=1445590&r1=1445589&r2=1445590&view=diff
==============================================================================
--- felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/impl/DSNotAvail.scala
(original)
+++ felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/impl/DSNotAvail.scala
Wed Feb 13 13:31:45 2013
@@ -41,10 +41,13 @@ class DSNotAvail extends ServiceDiagnost
         // this involves a bit of type casting gymnastics because the underlying 
         // API uses mutables and no generic types
         // Option is used to avoid null pointers
+        /*val comps = scrService.getComponents
+        if (comps == null) Nil
+        else */
         (for {
-            comp <- Option(scrService.getComponents).flatten.map(_.asInstanceOf[Component])
-            service <- Option(comp.getServices).flatten
-            deps = Option(comp.getReferences).flatten
+            comp <- Option[Array[Component]](scrService.getComponents).getOrElse(Array())
+            service <- Option[Array[String]](comp.getServices).getOrElse(Array())
+            deps = Option[Array[Reference]](comp.getReferences).getOrElse(Array())
                           .map(dep => new Dependency(dep.getServiceName,
                                                      dep.getTarget,
                                                      dep.isSatisfied)).toList

Modified: felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/webconsole/WebConsolePlugin.scala
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/webconsole/WebConsolePlugin.scala?rev=1445590&r1=1445589&r2=1445590&view=diff
==============================================================================
--- felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/webconsole/WebConsolePlugin.scala
(original)
+++ felix/trunk/webconsole-plugins/servicediagnostics/core/src/main/scala/servicediagnostics/webconsole/WebConsolePlugin.scala
Wed Feb 13 13:31:45 2013
@@ -38,6 +38,7 @@ import org.apache.felix.servicediagnosti
  *
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+//class WebConsolePlugin extends SimpleWebConsolePlugin("servicegraph", "Service Graph",
"OSGi", Array[String]()) 
 class WebConsolePlugin extends SimpleWebConsolePlugin("servicegraph", "Service Graph", Array[String]())

 {
     var engine:ServiceDiagnostics = _ //dependency injection. see Activator.

Modified: felix/trunk/webconsole-plugins/servicediagnostics/run.sh
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/servicediagnostics/run.sh?rev=1445590&r1=1445589&r2=1445590&view=diff
==============================================================================
--- felix/trunk/webconsole-plugins/servicediagnostics/run.sh (original)
+++ felix/trunk/webconsole-plugins/servicediagnostics/run.sh Wed Feb 13 13:31:45 2013
@@ -4,7 +4,7 @@ CLASSPATH=$SCALA:$REPO/org/apache/felix/
 #scala 
 java -classpath $CLASSPATH org.apache.felix.servicediagnostics.sample.FelixLauncher \
   $SCALA\
-  core/target/org.apache.felix.servicediagnostics.plugin-0.1.2-SNAPSHOT.jar\
+  core/target/org.apache.felix.servicediagnostics.plugin-0.1.3-SNAPSHOT.jar\
   sample/target/servicediagnostics.sample-0.1.1-SNAPSHOT.jar\
   $REPO/org/apache/felix/org.apache.felix.main/4.0.3/org.apache.felix.main-4.0.3.jar\
   $REPO/org/apache/felix/org.apache.felix.dependencymanager/3.0.0/org.apache.felix.dependencymanager-3.0.0.jar\

Modified: felix/trunk/webconsole-plugins/servicediagnostics/sample/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/servicediagnostics/sample/pom.xml?rev=1445590&r1=1445589&r2=1445590&view=diff
==============================================================================
--- felix/trunk/webconsole-plugins/servicediagnostics/sample/pom.xml (original)
+++ felix/trunk/webconsole-plugins/servicediagnostics/sample/pom.xml Wed Feb 13 13:31:45 2013
@@ -32,8 +32,8 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.felix</groupId>
-      <artifactId>${project.groupId}.servicediagnostics.plugin</artifactId>
-      <version>0.1.2-SNAPSHOT</version>
+      <artifactId>org.apache.felix.servicediagnostics.plugin</artifactId>
+      <version>0.1.3-SNAPSHOT</version>
     </dependency>
     <!-- runtime dependencies. added to populate the local repository -->
     <dependency> 
@@ -84,18 +84,13 @@
     <dependency>
       <groupId>org.apache.servicemix.bundles</groupId>
       <artifactId>org.apache.servicemix.bundles.scala-library</artifactId>
-      <version>2.9.1_3</version>
+      <version>2.10.0</version>
     </dependency>
   </dependencies>
 
   <build>
     <plugins>
       <plugin>
-        <groupId>org.scala-tools</groupId>
-        <artifactId>maven-scala-plugin</artifactId>
-      </plugin>
-
-      <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
         <configuration>



Mime
View raw message