Skip to content

Commit

Permalink
Revert changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
arturobernalg committed Oct 20, 2021
1 parent 2aa722a commit 4be435b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Licensed to the Apache Software Foundation (ASF) under one

/**
* <p>Event class for security events: login/logout, wiki group adds/changes, and authorization decisions. When a WikiSecurityEvent
* is constructed, the security logger {@link #log} is notified.</p>
* is constructed, the security logger {@link #LOG} is notified.</p>
* <p>These events are logged with priority <code>ERROR</code>:</p>
* <ul>
* <li>login failed - bad credential or password</li>
Expand Down Expand Up @@ -112,7 +112,7 @@ public final class WikiSecurityEvent extends WikiEvent {
public static final int PROFILE_NAME_CHANGED = 54;

/** The security logging service. */
static final Logger log = LogManager.getLogger( "SecurityLog" );
private static final Logger LOG = LogManager.getLogger( "SecurityLog" );

private final Principal m_principal;

Expand All @@ -126,7 +126,7 @@ public final class WikiSecurityEvent extends WikiEvent {

/**
* Constructs a new instance of this event type, which signals a security event has occurred. The <code>source</code> parameter is
* required, and may not be <code>null</code>. When the WikiSecurityEvent is constructed, the security logger {@link #log} is notified.
* required, and may not be <code>null</code>. When the WikiSecurityEvent is constructed, the security logger {@link #LOG} is notified.
*
* @param src the source of the event, which can be any object: a wiki page, group or authentication/authentication/group manager.
* @param type the type of event
Expand All @@ -140,19 +140,19 @@ public WikiSecurityEvent( final Object src, final int type, final Principal prin
}
this.m_principal = principal;
this.m_target = target;
if( log.isEnabled( Level.ERROR ) && ArrayUtils.contains( ERROR_EVENTS, type ) ) {
log.error( this );
} else if( log.isEnabled( Level.WARN ) && ArrayUtils.contains( WARN_EVENTS, type ) ) {
log.warn( this );
} else if( log.isEnabled( Level.INFO ) && ArrayUtils.contains( INFO_EVENTS, type ) ) {
log.info( this );
if( LOG.isEnabled( Level.ERROR ) && ArrayUtils.contains( ERROR_EVENTS, type ) ) {
LOG.error( this );
} else if( LOG.isEnabled( Level.WARN ) && ArrayUtils.contains( WARN_EVENTS, type ) ) {
LOG.warn( this );
} else if( LOG.isEnabled( Level.INFO ) && ArrayUtils.contains( INFO_EVENTS, type ) ) {
LOG.info( this );
}
log.debug( this );
LOG.debug( this );
}

/**
* Constructs a new instance of this event type, which signals a security event has occurred. The <code>source</code> parameter
* is required, and may not be <code>null</code>. When the WikiSecurityEvent is constructed, the security logger {@link #log}
* is required, and may not be <code>null</code>. When the WikiSecurityEvent is constructed, the security logger {@link #LOG}
* is notified.
*
* @param src the source of the event, which can be any object: a wiki page, group or authentication/authentication/group manager.
Expand Down
4 changes: 2 additions & 2 deletions jspwiki-main/src/main/java/org/apache/wiki/WikiSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Licensed to the Apache Software Foundation (ASF) under one
* methods for managing WikiSessions for an entire wiki. These methods allow callers to find, query and remove WikiSession objects, and
* to obtain a list of the current wiki session users.</p>
*/
public final class WikiSession implements Session {
public class WikiSession implements Session {

private static final Logger log = LogManager.getLogger( WikiSession.class );

Expand Down Expand Up @@ -88,7 +88,7 @@ public final class WikiSession implements Session {
* @param group the group to test
* @return the result
*/
boolean isInGroup( final Group group ) {
protected boolean isInGroup( final Group group ) {
for( final Principal principal : getPrincipals() ) {
if( isAuthenticated() && group.isMember( principal ) ) {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Licensed to the Apache Software Foundation (ASF) under one
*
* @since 2.4.22
*/
public final class DefaultCommandResolver implements CommandResolver {
public class DefaultCommandResolver implements CommandResolver {

/** Private map with request contexts as keys, Commands as values */
private static final Map< String, Command > CONTEXTS;
Expand Down Expand Up @@ -231,7 +231,7 @@ public String getSpecialPageReference( final String page ) {
* @param request the HTTP request
* @return the resolved Command, or <code>null</code> if not found
*/
Command extractCommandFromPath( final HttpServletRequest request ) {
protected Command extractCommandFromPath( final HttpServletRequest request ) {
String jsp = request.getServletPath();

// Take everything to right of initial / and left of # or ?
Expand Down

0 comments on commit 4be435b

Please sign in to comment.