[PR] chore(deps): update dependency org.codehaus.mojo:build-helper-maven-plugin to v3.5.0 [sling-site]

2023-11-24 Thread via GitHub


renovate-bot opened a new pull request, #147:
URL: https://github.com/apache/sling-site/pull/147

   [![Mend 
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
   
   This PR contains the following updates:
   
   | Package | Change | Age | Adoption | Passing | Confidence |
   |---|---|---|---|---|---|
   | 
[org.codehaus.mojo:build-helper-maven-plugin](https://www.mojohaus.org/build-helper-maven-plugin/)
 ([source](https://togithub.com/mojohaus/build-helper-maven-plugin)) | `3.4.0` 
-> `3.5.0` | 
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.codehaus.mojo:build-helper-maven-plugin/3.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.codehaus.mojo:build-helper-maven-plugin/3.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.codehaus.mojo:build-helper-maven-plugin/3.4.0/3.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.codehaus.mojo:build-helper-maven-plugin/3.4.0/3.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
 |
   
   ---
   
   > [!WARNING]
   > Some dependencies could not be looked up. Check the Dependency Dashboard 
for more information.
   
   ---
   
   ### Release Notes
   
   
   mojohaus/build-helper-maven-plugin 
(org.codehaus.mojo:build-helper-maven-plugin)
   
   ### 
[`v3.5.0`](https://togithub.com/mojohaus/build-helper-maven-plugin/releases/tag/3.5.0)
   
   [Compare 
Source](https://togithub.com/mojohaus/build-helper-maven-plugin/compare/3.4.0...3.5.0)
   
    Changes
   
     New features and improvements
   
   -   Add skipIfMissing flag 
([#187](https://togithub.com/mojohaus/build-helper-maven-plugin/pull/187))
 [@hgschmie](https://togithub.com/hgschmie)
   -   Add skip flags 
([#186](https://togithub.com/mojohaus/build-helper-maven-plugin/pull/186))
 [@hgschmie](https://togithub.com/hgschmie)
   -   Deprecate maven-version goal 
([#191](https://togithub.com/mojohaus/build-helper-maven-plugin/pull/191))
 [@slawekjaranowski](https://togithub.com/slawekjaranowski)
   
     Dependency updates
   
   -   Bump org.codehaus.mojo:mojo-parent from 76 to 77 
([#190](https://togithub.com/mojohaus/build-helper-maven-plugin/pull/190))
 [@dependabot](https://togithub.com/dependabot)
   -   Bump mojo-parent from 75 to 76 
([#185](https://togithub.com/mojohaus/build-helper-maven-plugin/pull/185))
 [@dependabot](https://togithub.com/dependabot)
   -   Bump mojo-parent from 74 to 75 
([#184](https://togithub.com/mojohaus/build-helper-maven-plugin/pull/184))
 [@dependabot](https://togithub.com/dependabot)
   -   Bump plexus-utils from 3.5.1 to 4.0.0 
([#183](https://togithub.com/mojohaus/build-helper-maven-plugin/pull/183))
 [@dependabot](https://togithub.com/dependabot)
   -   Bump maven-plugin-annotations from 3.8.2 to 3.9.0 
([#182](https://togithub.com/mojohaus/build-helper-maven-plugin/pull/182))
 [@dependabot](https://togithub.com/dependabot)
   
     Maintenance
   
   -   Use plugins versions from parent in ITs 
([#192](https://togithub.com/mojohaus/build-helper-maven-plugin/pull/192))
 [@slawekjaranowski](https://togithub.com/slawekjaranowski)
   -   Use Maven Apache shared GitHub action 
([#189](https://togithub.com/mojohaus/build-helper-maven-plugin/pull/189))
 [@slawekjaranowski](https://togithub.com/slawekjaranowski)
   -   Fix antrun version in ITs 
([#188](https://togithub.com/mojohaus/build-helper-maven-plugin/pull/188))
 [@slawekjaranowski](https://togithub.com/slawekjaranowski)
   -   Bump mojo-parent from 75 to 76 
([#185](https://togithub.com/mojohaus/build-helper-maven-plugin/pull/185))
 [@dependabot](https://togithub.com/dependabot)
   
   
   
   ---
   
   ### Configuration
   
    **Schedule**: Branch creation - At any time (no schedule defined), 
Automerge - At any time (no schedule defined).
   
    **Automerge**: Disabled by config. Please merge this manually once you are 
satisfied.
   
   ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry 
checkbox.
   
    **Ignore**: Close this PR and you won't be reminded about this update 
again.
   
   ---
   
- [ ] If you want to rebase/retry this PR, check this 
box
   
   ---
   
   This PR has been generated by [Mend 
Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository 
job log [here](https://developer.mend.io/github/apache/sling-site).
   

   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] SLING-12168 Implement MockUserManager#createSystemUser [sling-org-apache-sling-testing-jcr-mock]

2023-11-24 Thread via GitHub


sonarcloud[bot] commented on PR #29:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-jcr-mock/pull/29#issuecomment-1826110588

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-testing-jcr-mock=29)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=CODE_SMELL)
 [1 Code 
Smell](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=CODE_SMELL)
   
   
[![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png
 
'100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-jcr-mock=29=new_coverage=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-jcr-mock=29=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-jcr-mock=29=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-jcr-mock=29=new_duplicated_lines_density=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] SLING-12168 Implement MockUserManager#createSystemUser [sling-org-apache-sling-testing-jcr-mock]

2023-11-24 Thread via GitHub


sonarcloud[bot] commented on PR #29:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-jcr-mock/pull/29#issuecomment-1826102431

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-testing-jcr-mock=29)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=CODE_SMELL)
 [1 Code 
Smell](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-jcr-mock=29=false=CODE_SMELL)
   
   
[![81.5%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png
 
'81.5%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-jcr-mock=29=new_coverage=list)
 [81.5% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-jcr-mock=29=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-jcr-mock=29=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-jcr-mock=29=new_duplicated_lines_density=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Updated] (SLING-12168) Implement MockUserManager#createSystemUser

2023-11-24 Thread Eric Norman (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-12168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Norman updated SLING-12168:

Description: Provide a basic implementation of the 
MockUserManager#createSystemUser method.  (was: Provide a basic Implement of 
the MockUserManager#createSystemUser method.)

> Implement MockUserManager#createSystemUser
> --
>
> Key: SLING-12168
> URL: https://issues.apache.org/jira/browse/SLING-12168
> Project: Sling
>  Issue Type: Improvement
>Reporter: Eric Norman
>Assignee: Eric Norman
>Priority: Major
> Fix For: Testing JCR Mock 1.6.12
>
>
> Provide a basic implementation of the MockUserManager#createSystemUser method.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[PR] SLING-12168 Implement MockUserManager#createSystemUser [sling-org-apache-sling-testing-jcr-mock]

2023-11-24 Thread via GitHub


enapps-enorman opened a new pull request, #29:
URL: https://github.com/apache/sling-org-apache-sling-testing-jcr-mock/pull/29

   Provide a basic Implement of the MockUserManager#createSystemUser method.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Resolved] (SLING-12167) MockAuthorizable setProperty(String, Value[]) should create any missing intermediate nodes

2023-11-24 Thread Eric Norman (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-12167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Norman resolved SLING-12167.
-
Resolution: Fixed

Merged PR at:  
[{{f9c25bc}}|https://github.com/apache/sling-org-apache-sling-testing-jcr-mock/commit/f9c25bcb718f6f83e52d683757c57c24d132cdbd]

> MockAuthorizable setProperty(String, Value[]) should create any missing 
> intermediate nodes
> --
>
> Key: SLING-12167
> URL: https://issues.apache.org/jira/browse/SLING-12167
> Project: Sling
>  Issue Type: Bug
>Reporter: Eric Norman
>Assignee: Eric Norman
>Priority: Major
> Fix For: Testing JCR Mock 1.6.12
>
>
> MockAuthorizable setProperty(String, Value[]) should create any missing 
> intermediate nodes
> If the relPath argument contains multiple segments, then any missing 
> intermediate nodes should be autocreated



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (SLING-12166) MockUserManager getAuthorizable(String, Class) should return null if the authorizable does not exist

2023-11-24 Thread Eric Norman (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-12166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Norman resolved SLING-12166.
-
Resolution: Fixed

Merged PR at:  
[{{34c4370}}|https://github.com/apache/sling-org-apache-sling-testing-jcr-mock/commit/34c437066edd7fb74ee4ab8d68c425bbd315e8a5]

> MockUserManager getAuthorizable(String, Class) should return null if the 
> authorizable does not exist
> 
>
> Key: SLING-12166
> URL: https://issues.apache.org/jira/browse/SLING-12166
> Project: Sling
>  Issue Type: Bug
>Reporter: Eric Norman
>Assignee: Eric Norman
>Priority: Major
> Fix For: Testing JCR Mock 1.6.12
>
>
> MockUserManager#getAuthorizable(String, Class) should return null if the user 
> or group does not exist.  Currently it throws a AuthorizableTypeException 
> instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Re: [PR] SLING-12167 fix MockAuthorizable setProperty(String, Value[]) [sling-org-apache-sling-testing-jcr-mock]

2023-11-24 Thread via GitHub


enapps-enorman merged PR #28:
URL: https://github.com/apache/sling-org-apache-sling-testing-jcr-mock/pull/28


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] SLING-12166 fix MockUserManager getAuthorizable(String, Class) [sling-org-apache-sling-testing-jcr-mock]

2023-11-24 Thread via GitHub


enapps-enorman merged PR #27:
URL: https://github.com/apache/sling-org-apache-sling-testing-jcr-mock/pull/27


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Created] (SLING-12168) Implement MockUserManager#createSystemUser

2023-11-24 Thread Eric Norman (Jira)
Eric Norman created SLING-12168:
---

 Summary: Implement MockUserManager#createSystemUser
 Key: SLING-12168
 URL: https://issues.apache.org/jira/browse/SLING-12168
 Project: Sling
  Issue Type: Improvement
Reporter: Eric Norman
Assignee: Eric Norman
 Fix For: Testing JCR Mock 1.6.12


Provide a basic Implement of the MockUserManager#createSystemUser method.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Closed] (SLING-11842) Drop Java 8 build support from Parent

2023-11-24 Thread Konrad Windszus (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-11842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konrad Windszus closed SLING-11842.
---

> Drop Java 8 build support from Parent
> -
>
> Key: SLING-11842
> URL: https://issues.apache.org/jira/browse/SLING-11842
> Project: Sling
>  Issue Type: Improvement
>  Components: General
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: Parent 60 (Java 11)
>
>
> Given that Java 8 is EOL since quite some time, and soon Java 21 will be the 
> default LTS release we should drop support for Java 8 (that allows to get rid 
> of some profiles and plugins like 
> https://www.mojohaus.org/animal-sniffer/animal-sniffer-maven-plugin/).
> Even the newest JDK21 LTS still allows to build for Java 8, so this only 
> restrict the Java versions being used for building (not for running).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (SLING-12026) Check for implementation/extension of provider types

2023-11-24 Thread Konrad Windszus (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17789539#comment-17789539
 ] 

Konrad Windszus edited comment on SLING-12026 at 11/24/23 6:57 PM:
---

[~cziegeler] Isn't 
[https://docs.osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/versioning/ProviderType.html]
 a nearest wins semantics, i.e. if the directly implemented interface is not 
marked as provider type it is assumed to be a consumer type (i.e. the default) 
and the same for direct super classes which should overwrite the provider role 
of any transitive super or interface class?

Update: I just verified with bnd that it is a nearest wins strategy, so a 
consumer type (even no annotation, i.e. just the default) wins over a 
transitive provider type. Just if provider and consumer type is found on the 
same level the provider type takes precedence.


was (Author: kwin):
[~cziegeler] Isn't 
[https://docs.osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/versioning/ProviderType.html]
 a nearest wins semantics, i.e. if the directly implemented interface is not 
marked as provider type it is assumed to be a consumer type (i.e. the default) 
and the same for direct super classes which should overwrite the provider role 
of any transitive super or interface class?

Update: I just verified with bnd that it is a nearest wins strategy, so a 
consumer type (even no annotation, i.e. just the default) wins over a 
transitive provider type.

> Check for implementation/extension of provider types
> 
>
> Key: SLING-12026
> URL: https://issues.apache.org/jira/browse/SLING-12026
> Project: Sling
>  Issue Type: New Feature
>  Components: Feature Model Analyser
>Affects Versions: Feature Model Analyser 2.0.0
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
>
> OSGi distinguishes between 
> [consumer|https://docs.osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/versioning/ConsumerType.html]
>  and 
> [provider|https://docs.osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/versioning/ProviderType.html]
>  types (either interfaces or classes).
> Some bundles/features are only supposed to implement/extend consumer types in 
> order to be more stable against API changes. There should be a feature model 
> analyser enforcing this.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (SLING-12026) Check for implementation/extension of provider types

2023-11-24 Thread Konrad Windszus (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17789539#comment-17789539
 ] 

Konrad Windszus edited comment on SLING-12026 at 11/24/23 6:51 PM:
---

[~cziegeler] Isn't 
[https://docs.osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/versioning/ProviderType.html]
 a nearest wins semantics, i.e. if the directly implemented interface is not 
marked as provider type it is assumed to be a consumer type (i.e. the default) 
and the same for direct super classes which should overwrite the provider role 
of any transitive super or interface class?

Update: I just verified with bnd that it is a nearest wins strategy, so a 
consumer type (even no annotation, i.e. just the default) wins over a 
transitive provider type.


was (Author: kwin):
[~cziegeler] Isn't 
[https://docs.osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/versioning/ProviderType.html]
 a nearest wins semantic, i.e. if the directly implemented interface is not 
marked as provider type it is assumed to be a consumer type (i.e. the default) 
and the same for direct super classes which should overwrite the provider role 
of any transitive super or interface class?

> Check for implementation/extension of provider types
> 
>
> Key: SLING-12026
> URL: https://issues.apache.org/jira/browse/SLING-12026
> Project: Sling
>  Issue Type: New Feature
>  Components: Feature Model Analyser
>Affects Versions: Feature Model Analyser 2.0.0
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
>
> OSGi distinguishes between 
> [consumer|https://docs.osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/versioning/ConsumerType.html]
>  and 
> [provider|https://docs.osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/versioning/ProviderType.html]
>  types (either interfaces or classes).
> Some bundles/features are only supposed to implement/extend consumer types in 
> order to be more stable against API changes. There should be a feature model 
> analyser enforcing this.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Re: [PR] SLING-12160 Prevent ConcurrentModificationException in [sling-org-apache-sling-resourceresolver]

2023-11-24 Thread via GitHub


kwin commented on code in PR #107:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/107#discussion_r1404477462


##
src/test/java/org/apache/sling/resourceresolver/impl/mapping/MapEntriesTest.java:
##
@@ -161,8 +161,8 @@ public void setup() throws Exception {
 
 Optional metrics = Optional.empty();
 
-mapEntries = Mockito.spy(new MapEntries(resourceResolverFactory, 
bundleContext, eventAdmin, stringInterpolationProvider, metrics));
-final Field aliasMapField = 
MapEntries.class.getDeclaredField("aliasMap");
+mapEntries = /*Mockito.spy(*/new MapEntries(resourceResolverFactory, 
bundleContext, eventAdmin, stringInterpolationProvider, metrics);//);

Review Comment:
   @jsedding Do you have any idea why the spy was used here? I commented it to 
ease debugging and not having it didn't lead to any test failures.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (SLING-8974) Shows a 200 OK for a delete operation even if the node does not exist.

2023-11-24 Thread Patrique Legault (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-8974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17789490#comment-17789490
 ] 

Patrique Legault commented on SLING-8974:
-

I tested this locally as well as wrote a unit test on the DeleteOperation to 
validate that the operation fails on a NonExistingResource and returns a 400 
from the PostServlet. 

The unit tests pass and the E2E pass as well.

> Shows a 200 OK for a delete operation even if the node does not exist.
> --
>
> Key: SLING-8974
> URL: https://issues.apache.org/jira/browse/SLING-8974
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Reporter: Anisha Narang
>Priority: Major
>
> When you try any curl query for a 'delete' operation, it shows a 200 OK even 
> even the node does not exist.
> curl query:
> {code:java}
> $ curl -F":operation=delete" http://slinghosturl.com/content/invalid_node
> 
> 
> Content modified /content/invalid_node
> 
> 
> Content modified /content/invalid_node
> 
> 
> 
> Status
> 200
> 
> 
> Message
> OK
> 
> 
> Location
>  id="Location">/invalid_node
> 
> 
> Parent Location
> /content
> 
> 
> Path
> /content/invalid_node
> 
> 
> Referer
> 
> 
> 
> ChangeLog
>  id="ChangeLog">predeleted(/content/invalid_node);br//pre
> 
> 
> 
> Modified Resource
> Parent of Modified Resource
> 
> {code}
> So, even though this node does not exist, there is a 200 OK response for the 
> same which is not expected as per the documentation here -> 
> [https://sling.apache.org/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html#content-removal]
> Expected result:
> The response should be 404 not found if the not does not exist.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (SLING-12026) Check for implementation/extension of provider types

2023-11-24 Thread Carsten Ziegeler (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17789486#comment-17789486
 ] 

Carsten Ziegeler commented on SLING-12026:
--

looks good to me; you might want to go up the hierarchy of super classes (same 
for interfaces)

> Check for implementation/extension of provider types
> 
>
> Key: SLING-12026
> URL: https://issues.apache.org/jira/browse/SLING-12026
> Project: Sling
>  Issue Type: New Feature
>  Components: Feature Model Analyser
>Affects Versions: Feature Model Analyser 2.0.0
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
>
> OSGi distinguishes between 
> [consumer|https://docs.osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/versioning/ConsumerType.html]
>  and 
> [provider|https://docs.osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/versioning/ProviderType.html]
>  types (either interfaces or classes).
> Some bundles/features are only supposed to implement/extend consumer types in 
> order to be more stable against API changes. There should be a feature model 
> analyser enforcing this.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Re: [PR] SLING-12160 Prevent ConcurrentModificationException in [sling-org-apache-sling-resourceresolver]

2023-11-24 Thread via GitHub


jsedding commented on code in PR #107:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/107#discussion_r1404421763


##
src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java:
##
@@ -1243,24 +1236,20 @@ private boolean loadAlias(final Resource resource, 
Map parentMap = map.get(parentPath);
-
-if (parentMap == null) {
-parentMap = new LinkedHashMap<>();
-map.put(parentPath, parentMap);
-}
-
-String current = parentMap.get(alias);
-if (current != null) {
+ConcurrentMap> parentMap = 
map.computeIfAbsent(parentPath, key -> new ConcurrentHashMap<>());
+Optional currentResourceName = 
parentMap.entrySet().stream().filter(entry -> 
entry.getValue().contains(alias)).findFirst().map(Map.Entry::getKey);
+if (currentResourceName.isPresent()) {
 log.warn(
 "Encountered duplicate alias {} under 
parent path {}. Refusing to replace current target {} with {}.",
-alias, parentPath, current, resourceName);
+alias, parentPath, 
currentResourceName.get(), resourceName);
 } else {
-parentMap.put(alias, resourceName);
+List existingAliases = 
parentMap.computeIfAbsent(resourceName, name -> new CopyOnWriteArrayList<>());
+existingAliases.add(alias);

Review Comment:
   I think we don't because if we change a `sling:alias` property from `["foo", 
"bar"]` to  `["baz", "foo", "bar"]`, then "baz" would be added to the end of 
the list. That said, I believe the behaviour before your changes didn't account 
for this scenario either. Therefore, I don't consider it a blocker.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] SLING-12076 Export JcrResourceChange with additional method [sling-org-apache-sling-jcr-resource]

2023-11-24 Thread via GitHub


henrykuijpers commented on code in PR #39:
URL: 
https://github.com/apache/sling-org-apache-sling-jcr-resource/pull/39#discussion_r1404146108


##
src/main/java/org/apache/sling/jcr/resource/api/JcrResourceChange.java:
##
@@ -16,27 +16,37 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.jcr.resource.internal;
+package org.apache.sling.jcr.resource.api;
 
 import org.apache.sling.api.resource.observation.ResourceChange;
 
 /**
- * Extension of {@code ResourceChange} to support user id (if available)
+ * Extension of {@code ResourceChange} to support user id and user data (if 
available)
  */
-public class JcrResourceChange extends ResourceChange {
+public final class JcrResourceChange extends ResourceChange {

Review Comment:
   No, I'm fine with leaving it restricted. The class, at this moment, doesn't 
contain a lot of logic. 
   
   There have been quite some cases where it was very useful that "internal" 
implementations were freely accessible (for example JcrLabeledResource in 
Adobe's codebase, it contains quite some code to read the right properties etc) 
- creating a wrapper would still be possible



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] SLING-12076 Export JcrResourceChange with additional method [sling-org-apache-sling-jcr-resource]

2023-11-24 Thread via GitHub


kwin commented on code in PR #39:
URL: 
https://github.com/apache/sling-org-apache-sling-jcr-resource/pull/39#discussion_r1404094590


##
src/main/java/org/apache/sling/jcr/resource/api/JcrResourceChange.java:
##
@@ -16,27 +16,37 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.jcr.resource.internal;
+package org.apache.sling.jcr.resource.api;
 
 import org.apache.sling.api.resource.observation.ResourceChange;
 
 /**
- * Extension of {@code ResourceChange} to support user id (if available)
+ * Extension of {@code ResourceChange} to support user id and user data (if 
available)
  */
-public class JcrResourceChange extends ResourceChange {
+public final class JcrResourceChange extends ResourceChange {

Review Comment:
   Well it could, but it doesn't in this case, therefore I don't see a reason 
to open this here right now (due to restricting evolution of this class 
unnecessarily). Once again, if we come up with a good use case we can still 
change that, but let us always start with the most restricted API. 
@henrykuijpers If you have a convincing use case for extending please tell us.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org