You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ju...@apache.org on 2020/03/29 10:16:56 UTC
[jspwiki] 04/04: Fix bug detected by Sonar,
command should be compared againsts PageCommand,
not against the ContextEnum - No version bump
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 1ba2c7e408153546106a6dc67f4672846256f7d5
Author: juanpablo <ju...@apache.org>
AuthorDate: Sun Mar 29 12:16:27 2020 +0200
Fix bug detected by Sonar, command should be compared againsts PageCommand, not against the ContextEnum - No version bump
---
jspwiki-main/src/main/java/org/apache/wiki/WikiContext.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jspwiki-main/src/main/java/org/apache/wiki/WikiContext.java b/jspwiki-main/src/main/java/org/apache/wiki/WikiContext.java
index 7df7b5b..2c7b8e3 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/WikiContext.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/WikiContext.java
@@ -211,7 +211,7 @@ public class WikiContext implements Context, Command {
m_realPage = m_page;
// Special case: retarget any empty 'view' PageCommands to the front page
- if ( ContextEnum.PAGE_VIEW.equals( command ) && command.getTarget() == null ) {
+ if ( PageCommand.VIEW.equals( command ) && command.getTarget() == null ) {
m_command = command.targetedCommand( m_page );
}