Skip to content

SLING-12739 - selectively hide scripts and servlets from the Sling resolver #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from

Conversation

bdelacretaz
Copy link
Member

@bdelacretaz bdelacretaz commented Apr 4, 2025

Work in progress, initial implementation with incomplete tests

@bdelacretaz bdelacretaz self-assigned this Apr 4, 2025
@bdelacretaz bdelacretaz marked this pull request as draft April 4, 2025 16:04
@bdelacretaz
Copy link
Member Author

@@ -460,6 +469,16 @@ private Resource getErrorResource(final SlingHttpServletRequest request) {
return res;
}

/** @return true if the given Resource is hidden by our resourceHidingPredicate */
private boolean isHidden(Resource r) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would explicitly mention that this method requires a non-null parameter (and that for this reason null-checks are missing).

Suggested change
private boolean isHidden(Resource r) {
private boolean isHidden(@NotNull Resource r) {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thank you! Changed as suggested.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link

sonarqubecloud bot commented Jul 7, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@bdelacretaz
Copy link
Member Author

Closing this as I have applied the changes to the resolver-2.x branch in this commit:
26edac2
As I need a release of this module before I'm ready to integrate the 3.x version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants