code formatting; remove FIXME: tag, check is done on WikiEngine#enforceValidTemplateDirectory
@@ -21,6 +21,7 @@ package org.apache.wiki;
import java.security.Permission;
import java.security.Principal;
import java.util.HashMap;
+import java.util.PropertyPermission;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
@@ -76,10 +77,7 @@ public class WikiContext
private HashMap<String,Object> m_variableMap = new HashMap<>();
- /**
- * Stores the HttpServletRequest. May be null, if the request did not
- * come from a servlet.
- */
+ /** Stores the HttpServletRequest. May be null, if the request did not come from a servlet. */
protected HttpServletRequest m_request = null;
private WikiSession m_session = null;
@@ -87,8 +85,7 @@ public class WikiContext
/** User is administering JSPWiki (Install, SecurityConfig). */
public static final String INSTALL = WikiCommand.INSTALL.getRequestContext();
- /** The VIEW context - the user just wants to view the page
- contents. */
+ /** The VIEW context - the user just wants to view the page contents. */
public static final String VIEW = PageCommand.VIEW.getRequestContext();
/** User wants to view or administer workflows. */
@@ -169,7 +166,7 @@ public class WikiContext
private static final Logger log = Logger.getLogger( WikiContext.class );
- private static final Permission DUMMY_PERMISSION = new java.util.PropertyPermission( "os.name", "read" );
+ private static final Permission DUMMY_PERMISSION = new PropertyPermission( "os.name", "read" );
/**
* Create a new WikiContext for the given WikiPage. Delegates to
@@ -682,6 +679,7 @@ public class WikiContext
* @since 2.8.0
* @return A deep clone of the WikiContext.
*/
+ @SuppressWarnings("unchecked")
public WikiContext deepClone()
{
try
@@ -814,9 +812,6 @@ public class WikiContext
*/
protected void setDefaultTemplate( HttpServletRequest request )
{
- // FIXME: Most definitely this should be checked for
- // existence, or else it is possible to create pages that
- // cannot be shown.
String defaultTemplate = m_engine.getTemplateDir();
// Figure out which template we should be using for this page.
