You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2022/08/24 11:49:41 UTC

[sling-org-apache-sling-resource-presence] branch master updated (9c340da -> df4576f)

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

olli pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resource-presence.git


    from 9c340da  tell Jenkins to run build with Java 11 and 17
     new 01e72ff  suppress warnings for rule java:S1149
     new 56c9756  suppress warnings for rule java:S3077
     new 9a8d77e  set version to 1.0.0-SNAPSHOT
     new df4576f  add link, fix typo and improve code example

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README.md                                                         | 8 ++++----
 pom.xml                                                           | 2 +-
 .../sling/resource/presence/internal/ResourcePresenter.java       | 5 ++++-
 3 files changed, 9 insertions(+), 6 deletions(-)


[sling-org-apache-sling-resource-presence] 01/04: suppress warnings for rule java:S1149

Posted by ol...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resource-presence.git

commit 01e72ffac1854c4ede7b3aea05a86b2ff5e4cb98
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Wed Aug 24 13:29:03 2022 +0200

    suppress warnings for rule java:S1149
---
 .../org/apache/sling/resource/presence/internal/ResourcePresenter.java  | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main/java/org/apache/sling/resource/presence/internal/ResourcePresenter.java b/src/main/java/org/apache/sling/resource/presence/internal/ResourcePresenter.java
index 6db1bab..886d95e 100644
--- a/src/main/java/org/apache/sling/resource/presence/internal/ResourcePresenter.java
+++ b/src/main/java/org/apache/sling/resource/presence/internal/ResourcePresenter.java
@@ -120,6 +120,7 @@ public final class ResourcePresenter {
     }
 
     private void registerResourcePresence() {
+        @SuppressWarnings("java:S1149")
         final Dictionary<String, Object> properties = new Hashtable<>();
         properties.put("path", path);
         presenceRegistration = bundleContext.registerService(ResourcePresence.class, resourcePresence(), properties);
@@ -135,6 +136,7 @@ public final class ResourcePresenter {
     }
 
     private void registerResourceChangeListener() {
+        @SuppressWarnings("java:S1149")
         final Dictionary<String, Object> properties = new Hashtable<>();
         properties.put(ResourceChangeListener.PATHS, path);
         listenerRegistration = bundleContext.registerService(ResourceChangeListener.class, resourceChangeListener(), properties);


[sling-org-apache-sling-resource-presence] 04/04: add link, fix typo and improve code example

Posted by ol...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resource-presence.git

commit df4576f6863f7baef501ec539d3f784fc9c280e5
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Wed Aug 24 13:37:54 2022 +0200

    add link, fix typo and improve code example
---
 README.md | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index 9aeb1af..720ff0d 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
 
 This module is part of the [Apache Sling](https://sling.apache.org) project.
 
-This module creates proxy OSGi services that are registered only if specific resources are present.
+This module creates proxy OSGi services that are registered only if specific [resources](https://sling.apache.org/documentation/the-sling-engine/resources.html) are present.
 
 Like for example:
 
@@ -14,7 +14,7 @@ Like for example:
 	private ResourcePresence barIsPresent;
 	
 The `barIsPresent` service is registered only if the `/content/foo/bar` resource is present, allowing OSGi
-components to be dependent on the presence of specific Resources.
+components to be dependent on the presence of specific resources.
 
 This is mostly meant for testing, to wait for test content before running specific tests.
 
@@ -45,12 +45,12 @@ When running tests with resources involved, you can use a resource presence to d
 
     @Configuration
     public Option[] configuration() {
-        return new Option[]{
+        return options(
             [...],
             factoryConfiguration("org.apache.sling.resource.presence.internal.ResourcePresenter")
                 .put("path", "/apps")
                 .asOption()
-        };
+        );
     }
 
     @Test


[sling-org-apache-sling-resource-presence] 03/04: set version to 1.0.0-SNAPSHOT

Posted by ol...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resource-presence.git

commit 9a8d77e1714886aa4b5a98756523a2d42605c287
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Wed Aug 24 13:30:40 2022 +0200

    set version to 1.0.0-SNAPSHOT
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index ecf0994..c31c366 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
   </parent>
 
   <artifactId>org.apache.sling.resource.presence</artifactId>
-  <version>0.0.3-SNAPSHOT</version>
+  <version>1.0.0-SNAPSHOT</version>
 
   <name>Apache Sling Resource Presence</name>
   <description>Apache Sling Resource Presence</description>


[sling-org-apache-sling-resource-presence] 02/04: suppress warnings for rule java:S3077

Posted by ol...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resource-presence.git

commit 56c9756aed51dd70e61d518f59344b5ccff3cc3f
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Wed Aug 24 13:29:32 2022 +0200

    suppress warnings for rule java:S3077
---
 .../org/apache/sling/resource/presence/internal/ResourcePresenter.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/resource/presence/internal/ResourcePresenter.java b/src/main/java/org/apache/sling/resource/presence/internal/ResourcePresenter.java
index 886d95e..6b0939f 100644
--- a/src/main/java/org/apache/sling/resource/presence/internal/ResourcePresenter.java
+++ b/src/main/java/org/apache/sling/resource/presence/internal/ResourcePresenter.java
@@ -62,10 +62,11 @@ public final class ResourcePresenter {
     private ServiceRegistration<ResourceChangeListener> listenerRegistration;
 
     @Reference
+    @SuppressWarnings("java:S3077")
     private volatile ResourceResolverFactory resourceResolverFactory;
 
     @Reference
-    @SuppressWarnings("unused")
+    @SuppressWarnings({"unused", "java:S3077"})
     private volatile ServiceUserMapped serviceUserMapped;
 
     private final Logger logger = LoggerFactory.getLogger(ResourcePresenter.class);