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

JSPWIKI-1156 - Remove 'protected' member in 'final' class #141

Merged
merged 1 commit into from
Oct 28, 2021

Conversation

arturobernalg
Copy link
Member

No description provided.

Copy link
Contributor

@juanpablo-santos juanpablo-santos left a comment

Choose a reason for hiding this comment

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

changes requested

Copy link
Contributor

@juanpablo-santos juanpablo-santos left a comment

Choose a reason for hiding this comment

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

A couple more, really small, changes..

@@ -388,7 +388,7 @@ public void invalidate() {
* This method should generally be called after a user's {@link org.apache.wiki.auth.user.UserProfile} is saved. If the wiki session
* is null, or there is no matching user profile, the method returns silently.
*/
protected void injectGroupPrincipals() {
void injectGroupPrincipals() {
Copy link
Contributor

Choose a reason for hiding this comment

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

protected should also be retained here.

@@ -406,7 +406,7 @@ protected void injectGroupPrincipals() {
* and login name. These Principals will be WikiPrincipals, and they will replace all other WikiPrincipals in the Subject. <em>Note:
* this method is never called during anonymous or asserted sessions.</em>
*/
protected void injectUserProfilePrincipals() {
void injectUserProfilePrincipals() {
Copy link
Contributor

Choose a reason for hiding this comment

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

protected should also be retained here.

@@ -325,7 +325,7 @@ public Page resolvePage( final HttpServletRequest request, String page ) {
* @throws ProviderException if the underlyng page provider that locates pages
* throws an exception
*/
protected boolean simplePageExists( final String page ) throws ProviderException {
boolean simplePageExists( final String page ) throws ProviderException {
Copy link
Contributor

Choose a reason for hiding this comment

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

protected should also be retained here.

As of last comment here, DefaultCommandResolver isn't instantiated directly, but obtained through Engine#getManager( Class<?> ). Previous versions of JSPWiki were returning specifically DefaultCommandResolver, but nowadays we're returning a CommandResolver (an interface extracted from the former class), so it is possible to provide an alternative implementation.

Hence, in order to allow reuse, it makes more sense to remove the final class modifier, rather than removing the protected modifier. Doing this should be really uncommon, but you never know..

Copy link
Contributor

@juanpablo-santos juanpablo-santos left a comment

Choose a reason for hiding this comment

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

Merging in order to get out 2.11.0-git-12, I'll add the requested modifiers

@juanpablo-santos juanpablo-santos merged commit 551de88 into apache:master Oct 28, 2021
juanpablo-santos added a commit that referenced this pull request Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants