Skip to content
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

WW-5385 Decompose StrutsVelocityContext for better re-usability #839

Closed
wants to merge 1 commit into from

Conversation

kusalk
Copy link
Member

@kusalk kusalk commented Jan 8, 2024

WW-5385

Decomposes StrutsVelocityContext into:

  • CompositeContext - combines multiple contexts into 1, can only be used as an inner or "chained" context

  • ChainedVelocityContext - extends the standard VelocityContext to correct #getKeys when an inner context is used

  • DirectiveVelocityContext - is additionally capable of rendering Struts directives

  • StrutsVelocityContext - is additionally capable of looking up items in the ValueStack

The DirectiveVelocityContext specifically, enables applications greater flexibility in which capabilities they wish to leverage. ChainedVelocityContext and CompositeContext are useful utility contexts that can be used for general Velocity purposes.

@kusalk kusalk force-pushed the WW-5385-strutsvelocitycontext branch 3 times, most recently from 9bc7978 to 3916085 Compare January 8, 2024 07:39
@kusalk
Copy link
Member Author

kusalk commented Jan 8, 2024

SonarCloud note: There are indeed 6 levels of inheritance here but 3 of them are within the Velocity library - plus each of our context classes have a distinct purpose/use, so acceptable IMO

@kusalk kusalk force-pushed the WW-5385-strutsvelocitycontext branch from 3916085 to 3ac5c06 Compare January 8, 2024 09:39
@kusalk
Copy link
Member Author

kusalk commented Jan 8, 2024

Closing this for now and considering for Struts 7.0 instead as these changes break backwards compatibility with Velocity 1.x

@kusalk kusalk closed this Jan 8, 2024
Copy link

sonarqubecloud bot commented Jan 8, 2024

Quality Gate Failed Quality Gate failed

Failed conditions

B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

idea Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

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.

1 participant