Skip to content

SLING-12516 - Migrate SlingContext to Rhino Context(ContextFactory) API#8

Open
scottyuancoc wants to merge 2 commits intoapache:masterfrom
scottyuancoc:feature/SLING-12516
Open

SLING-12516 - Migrate SlingContext to Rhino Context(ContextFactory) API#8
scottyuancoc wants to merge 2 commits intoapache:masterfrom
scottyuancoc:feature/SLING-12516

Conversation

@scottyuancoc
Copy link
Copy Markdown
Contributor

  • Replaced the deprecated Rhino Context() API with the updated Context(ContextFactory) API.
  • Eliminated dependency on the Rhino global static singleton context factory.

Copy link
Copy Markdown
Contributor

@rombert rombert left a comment

Choose a reason for hiding this comment

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

@scottyuancoc - I ran the Sling Starter ITs with your changes and I get two failures. Can you please check?

  • build and install the code from this PR
  • clone https://github.com/apache/sling-org-apache-sling-starter/
  • update src/main/features/scripting.json to reference the SNAPSHOT version you just built
  • run mvn clean install in the starter project

For me, this results in

[ERROR] Tests run: 573, Failures: 2, Errors: 0, Skipped: 1

@sonarqubecloud
Copy link
Copy Markdown

* Replace the deprecated Rhino Context() API with the updated Context(ContextFactory) API.
* Align the implementation with the Rhino global static context factory model.
* Add test cases to ensure alignment with the Rhino global static context factory model.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Aug 8, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
65.7% Coverage on New Code (required ≥ 80%)
B Maintainability 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

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.

2 participants