felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1636068 - /felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/customdep/PathDependency.java
Date Sat, 01 Nov 2014 23:07:49 GMT
Author: pderop
Date: Sat Nov  1 23:07:49 2014
New Revision: 1636068

URL: http://svn.apache.org/r1636068
Log:
Fixed getName(), getPath() and run() methods

Modified:
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/customdep/PathDependency.java

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/customdep/PathDependency.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/customdep/PathDependency.java?rev=1636068&r1=1636067&r2=1636068&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/customdep/PathDependency.java
(original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/customdep/PathDependency.java
Sat Nov  1 23:07:49 2014
@@ -73,12 +73,12 @@ public class PathDependency extends Abst
 
     @Override
     public String getName() {
-        return "" + isAvailable();
+        return m_path;
     }
 
     @Override
     public String getType() {
-        return "file";
+        return "path";
     }
 
     protected void startTracking() {
@@ -108,10 +108,8 @@ public class PathDependency extends Abst
             WatchKey watckKey = watcher.take();
             List<WatchEvent<?>> events = watckKey.pollEvents();
 
-            for (WatchEvent event : events) {
-                if (event.kind() == StandardWatchEventKinds.ENTRY_MODIFY) {
-                    add(new PathEvent(event.context().toString()));
-                }
+            for (WatchEvent event : events) {                
+                add(new PathEvent(event.context().toString()));
             }
         } catch (Exception e) {
             System.out.println("Error: " + e.toString());



Mime
View raw message