From 791658f3534bcdbc754f82f1e21091e85a87c52a Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Fri, 26 May 2017 10:39:52 +0300 Subject: Use correct listener in dependency filter test This fixes the test after the changes in #9368 --- .../test/dependencyrewriteaddon/RewriteJQueryFilter.java | 11 ++++++++++- .../META-INF/services/com.vaadin.server.DependencyFilter | 1 - .../services/com.vaadin.server.VaadinServiceInitListener | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) delete mode 100644 test/dependency-rewrite-addon/src/main/resources/META-INF/services/com.vaadin.server.DependencyFilter create mode 100644 test/dependency-rewrite-addon/src/main/resources/META-INF/services/com.vaadin.server.VaadinServiceInitListener (limited to 'test/dependency-rewrite-addon') diff --git a/test/dependency-rewrite-addon/src/main/java/com/vaadin/test/dependencyrewriteaddon/RewriteJQueryFilter.java b/test/dependency-rewrite-addon/src/main/java/com/vaadin/test/dependencyrewriteaddon/RewriteJQueryFilter.java index 415bb9b093..3a317da46c 100644 --- a/test/dependency-rewrite-addon/src/main/java/com/vaadin/test/dependencyrewriteaddon/RewriteJQueryFilter.java +++ b/test/dependency-rewrite-addon/src/main/java/com/vaadin/test/dependencyrewriteaddon/RewriteJQueryFilter.java @@ -5,10 +5,13 @@ import java.util.List; import java.util.Locale; import com.vaadin.server.DependencyFilter; +import com.vaadin.server.ServiceInitEvent; +import com.vaadin.server.VaadinServiceInitListener; import com.vaadin.ui.Dependency; import com.vaadin.ui.Dependency.Type; -public class RewriteJQueryFilter implements DependencyFilter { +public class RewriteJQueryFilter + implements DependencyFilter, VaadinServiceInitListener { @Override public List filter(List dependencies, @@ -25,4 +28,10 @@ public class RewriteJQueryFilter implements DependencyFilter { } return filtered; } + + // for compactness, implementing the init listener here + @Override + public void serviceInit(ServiceInitEvent event) { + event.addDependencyFilter(this); + } } diff --git a/test/dependency-rewrite-addon/src/main/resources/META-INF/services/com.vaadin.server.DependencyFilter b/test/dependency-rewrite-addon/src/main/resources/META-INF/services/com.vaadin.server.DependencyFilter deleted file mode 100644 index f62efa26fd..0000000000 --- a/test/dependency-rewrite-addon/src/main/resources/META-INF/services/com.vaadin.server.DependencyFilter +++ /dev/null @@ -1 +0,0 @@ -com.vaadin.test.dependencyrewriteaddon.RewriteJQueryFilter diff --git a/test/dependency-rewrite-addon/src/main/resources/META-INF/services/com.vaadin.server.VaadinServiceInitListener b/test/dependency-rewrite-addon/src/main/resources/META-INF/services/com.vaadin.server.VaadinServiceInitListener new file mode 100644 index 0000000000..f62efa26fd --- /dev/null +++ b/test/dependency-rewrite-addon/src/main/resources/META-INF/services/com.vaadin.server.VaadinServiceInitListener @@ -0,0 +1 @@ +com.vaadin.test.dependencyrewriteaddon.RewriteJQueryFilter -- cgit v1.2.3