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 c6a6b88735e16bf80e8b84e130fda443ce826a12
Author: juanpablo <juanpa...@apache.org>
AuthorDate: Sat Nov 3 00:51:59 2018 +0100

    remove always-true condition and unused variable
---
 jspwiki-main/src/main/java/org/apache/wiki/WikiContext.java | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

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 b916e92..455f70e 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/WikiContext.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/WikiContext.java
@@ -349,9 +349,7 @@ public class WikiContext
     public String getRedirectURL()
     {
         String pagename = m_page.getName();
-        String redirURL = null;
-
-        redirURL = m_engine.getCommandResolver().getSpecialPageReference( 
pagename );
+        String redirURL = 
m_engine.getCommandResolver().getSpecialPageReference( pagename );
 
         if( redirURL == null )
         {
@@ -750,22 +748,17 @@ public class WikiContext
         if ( WikiCommand.INSTALL.equals( m_command ) )
         {
             // See if admin users exists
-            boolean adminExists = false;
             try
             {
                 UserManager userMgr = m_engine.getUserManager();
                 UserDatabase userDb = userMgr.getUserDatabase();
                 userDb.findByLoginName( Installer.ADMIN_ID );
-                adminExists = true;
             }
             catch ( NoSuchPrincipalException e )
             {
                 return DUMMY_PERMISSION;
             }
-            if ( adminExists )
-            {
-                return new AllPermission( m_engine.getApplicationName() );
-            }
+            return new AllPermission( m_engine.getApplicationName() );
         }
 
         // TODO: we should really break the contract so that this

Reply via email to