You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2023/02/28 10:11:46 UTC

[sling-org-apache-sling-testing-sling-mock] branch master updated: SLING-11792 Allow mixture of plugins/callbacks

This is an automated email from the ASF dual-hosted git repository.

sseifert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git


The following commit(s) were added to refs/heads/master by this push:
     new 20c6810  SLING-11792 Allow mixture of plugins/callbacks
20c6810 is described below

commit 20c6810fee94ed14b1fea549bc0d32651e732240
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Tue Feb 28 10:42:53 2023 +0100

    SLING-11792 Allow mixture of plugins/callbacks
---
 .../sling/testing/mock/sling/junit/SlingContextBuilder.java    | 10 +++++-----
 .../sling/testing/mock/sling/junit/SlingContextBuilder.java    | 10 +++++-----
 .../sling/testing/mock/sling/junit5/SlingContextBuilder.java   | 10 +++++-----
 parent/pom.xml                                                 |  2 +-
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/core/src/test/java/org/apache/sling/testing/mock/sling/junit/SlingContextBuilder.java b/core/src/test/java/org/apache/sling/testing/mock/sling/junit/SlingContextBuilder.java
index babe912..329b19b 100644
--- a/core/src/test/java/org/apache/sling/testing/mock/sling/junit/SlingContextBuilder.java
+++ b/core/src/test/java/org/apache/sling/testing/mock/sling/junit/SlingContextBuilder.java
@@ -74,7 +74,7 @@ public final class SlingContextBuilder {
      * @return this
      */
     @SafeVarargs
-    public final @NotNull <T extends OsgiContextImpl> SlingContextBuilder plugin(@NotNull ContextPlugin<T> @NotNull ... plugin) {
+    public final @NotNull SlingContextBuilder plugin(@NotNull ContextPlugin<? extends OsgiContextImpl> @NotNull ... plugin) {
         plugins.addPlugin(plugin);
         return this;
     }
@@ -85,7 +85,7 @@ public final class SlingContextBuilder {
      * @return this
      */
     @SafeVarargs
-    public final @NotNull <T extends OsgiContextImpl> SlingContextBuilder beforeSetUp(@NotNull ContextCallback<T> @NotNull ... beforeSetUpCallback) {
+    public final @NotNull SlingContextBuilder beforeSetUp(@NotNull ContextCallback<? extends OsgiContextImpl> @NotNull ... beforeSetUpCallback) {
         plugins.addBeforeSetUpCallback(beforeSetUpCallback);
         return this;
     }
@@ -96,7 +96,7 @@ public final class SlingContextBuilder {
      * @return this
      */
     @SafeVarargs
-    public final @NotNull <T extends OsgiContextImpl> SlingContextBuilder afterSetUp(@NotNull ContextCallback<T> @NotNull ... afterSetUpCallback) {
+    public final @NotNull SlingContextBuilder afterSetUp(@NotNull ContextCallback<? extends OsgiContextImpl> @NotNull ... afterSetUpCallback) {
         plugins.addAfterSetUpCallback(afterSetUpCallback);
         return this;
     }
@@ -107,7 +107,7 @@ public final class SlingContextBuilder {
      * @return this
      */
     @SafeVarargs
-    public final @NotNull <T extends OsgiContextImpl> SlingContextBuilder beforeTearDown(@NotNull ContextCallback<T> @NotNull ... beforeTearDownCallback) {
+    public final @NotNull SlingContextBuilder beforeTearDown(@NotNull ContextCallback<? extends OsgiContextImpl> @NotNull ... beforeTearDownCallback) {
         plugins.addBeforeTearDownCallback(beforeTearDownCallback);
         return this;
     }
@@ -118,7 +118,7 @@ public final class SlingContextBuilder {
      * @return this
      */
     @SafeVarargs
-    public final @NotNull <T extends OsgiContextImpl> SlingContextBuilder afterTearDown(@NotNull ContextCallback<T> @NotNull ... afterTearDownCallback) {
+    public final @NotNull SlingContextBuilder afterTearDown(@NotNull ContextCallback<? extends OsgiContextImpl> @NotNull ... afterTearDownCallback) {
         plugins.addAfterTearDownCallback(afterTearDownCallback);
         return this;
     }
diff --git a/junit4/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContextBuilder.java b/junit4/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContextBuilder.java
index 762e07e..256ee8e 100644
--- a/junit4/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContextBuilder.java
+++ b/junit4/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContextBuilder.java
@@ -67,7 +67,7 @@ public final class SlingContextBuilder {
      * @return this
      */
     @SafeVarargs
-    public final @NotNull <T extends OsgiContextImpl> SlingContextBuilder plugin(@NotNull ContextPlugin<T> @NotNull ... plugin) {
+    public final @NotNull SlingContextBuilder plugin(@NotNull ContextPlugin<? extends OsgiContextImpl> @NotNull ... plugin) {
         plugins.addPlugin(plugin);
         return this;
     }
@@ -78,7 +78,7 @@ public final class SlingContextBuilder {
      * @return this
      */
     @SafeVarargs
-    public final @NotNull <T extends OsgiContextImpl> SlingContextBuilder beforeSetUp(@NotNull ContextCallback<T> @NotNull ... beforeSetUpCallback) {
+    public final @NotNull SlingContextBuilder beforeSetUp(@NotNull ContextCallback<? extends OsgiContextImpl> @NotNull ... beforeSetUpCallback) {
         plugins.addBeforeSetUpCallback(beforeSetUpCallback);
         return this;
     }
@@ -89,7 +89,7 @@ public final class SlingContextBuilder {
      * @return this
      */
     @SafeVarargs
-    public final @NotNull <T extends OsgiContextImpl> SlingContextBuilder afterSetUp(@NotNull ContextCallback<T> @NotNull ... afterSetUpCallback) {
+    public final @NotNull SlingContextBuilder afterSetUp(@NotNull ContextCallback<? extends OsgiContextImpl> @NotNull ... afterSetUpCallback) {
         plugins.addAfterSetUpCallback(afterSetUpCallback);
         return this;
     }
@@ -100,7 +100,7 @@ public final class SlingContextBuilder {
      * @return this
      */
     @SafeVarargs
-    public final @NotNull <T extends OsgiContextImpl> SlingContextBuilder beforeTearDown(@NotNull ContextCallback<T> @NotNull ... beforeTearDownCallback) {
+    public final @NotNull SlingContextBuilder beforeTearDown(@NotNull ContextCallback<? extends OsgiContextImpl> @NotNull ... beforeTearDownCallback) {
         plugins.addBeforeTearDownCallback(beforeTearDownCallback);
         return this;
     }
@@ -111,7 +111,7 @@ public final class SlingContextBuilder {
      * @return this
      */
     @SafeVarargs
-    public final @NotNull <T extends OsgiContextImpl> SlingContextBuilder afterTearDown(@NotNull ContextCallback<T> @NotNull ... afterTearDownCallback) {
+    public final @NotNull SlingContextBuilder afterTearDown(@NotNull ContextCallback<? extends OsgiContextImpl> @NotNull ... afterTearDownCallback) {
         plugins.addAfterTearDownCallback(afterTearDownCallback);
         return this;
     }
diff --git a/junit5/src/main/java/org/apache/sling/testing/mock/sling/junit5/SlingContextBuilder.java b/junit5/src/main/java/org/apache/sling/testing/mock/sling/junit5/SlingContextBuilder.java
index 428e086..cd0ea07 100644
--- a/junit5/src/main/java/org/apache/sling/testing/mock/sling/junit5/SlingContextBuilder.java
+++ b/junit5/src/main/java/org/apache/sling/testing/mock/sling/junit5/SlingContextBuilder.java
@@ -70,7 +70,7 @@ public final class SlingContextBuilder {
      * @return this
      */
     @SafeVarargs
-    public final <T extends OsgiContextImpl> SlingContextBuilder plugin(@NotNull ContextPlugin<T> @NotNull ... plugin) {
+    public final SlingContextBuilder plugin(@NotNull ContextPlugin<? extends OsgiContextImpl> @NotNull ... plugin) {
         plugins.addPlugin(plugin);
         return this;
     }
@@ -83,7 +83,7 @@ public final class SlingContextBuilder {
      * @return this
      */
     @SafeVarargs
-    public final <T extends OsgiContextImpl> SlingContextBuilder beforeSetUp(@NotNull ContextCallback<T> @NotNull ... beforeSetUpCallback) {
+    public final SlingContextBuilder beforeSetUp(@NotNull ContextCallback<? extends OsgiContextImpl> @NotNull ... beforeSetUpCallback) {
         plugins.addBeforeSetUpCallback(beforeSetUpCallback);
         return this;
     }
@@ -96,7 +96,7 @@ public final class SlingContextBuilder {
      * @return this
      */
     @SafeVarargs
-    public final <T extends OsgiContextImpl> SlingContextBuilder afterSetUp(@NotNull ContextCallback<T> @NotNull ... afterSetUpCallback) {
+    public final SlingContextBuilder afterSetUp(@NotNull ContextCallback<? extends OsgiContextImpl> @NotNull ... afterSetUpCallback) {
         plugins.addAfterSetUpCallback(afterSetUpCallback);
         return this;
     }
@@ -109,7 +109,7 @@ public final class SlingContextBuilder {
      * @return this
      */
     @SafeVarargs
-    public final <T extends OsgiContextImpl> SlingContextBuilder beforeTearDown(@NotNull ContextCallback<T> @NotNull ... beforeTearDownCallback) {
+    public final SlingContextBuilder beforeTearDown(@NotNull ContextCallback<? extends OsgiContextImpl> @NotNull ... beforeTearDownCallback) {
         plugins.addBeforeTearDownCallback(beforeTearDownCallback);
         return this;
     }
@@ -122,7 +122,7 @@ public final class SlingContextBuilder {
      * @return this
      */
     @SafeVarargs
-    public final <T extends OsgiContextImpl> SlingContextBuilder afterTearDown(@NotNull ContextCallback<T> @NotNull ... afterTearDownCallback) {
+    public final SlingContextBuilder afterTearDown(@NotNull ContextCallback<? extends OsgiContextImpl> @NotNull ... afterTearDownCallback) {
         plugins.addAfterTearDownCallback(afterTearDownCallback);
         return this;
     }
diff --git a/parent/pom.xml b/parent/pom.xml
index d639369..c2aed66 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -35,7 +35,7 @@
     <description>Mock implementation of selected Sling APIs.</description>
 
     <properties>
-        <osgi-mock.version>3.3.4</osgi-mock.version>
+        <osgi-mock.version>3.3.5-SNAPSHOT</osgi-mock.version>
         <jcr-mock.version>1.6.0</jcr-mock.version>
         <resourceresolver-mock.version>1.4.0</resourceresolver-mock.version>
         <logging-mock.version>2.0.0</logging-mock.version>