You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2018/12/25 23:24:30 UTC
[myfaces] 02/02: removed outdated TODOs
This is an automated email from the ASF dual-hosted git repository.
tandraschko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces.git
commit 7759905932360c08b87cb1367b9090864e018583
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Wed Dec 26 00:24:39 2018 +0100
removed outdated TODOs
---
.../faces/event/ExceptionQueuedEventContext.java | 7 +++----
.../javax/faces/render/ResponseStateManager.java | 24 ++++++++++++++++++----
.../javax/faces/view/facelets/FaceletContext.java | 1 -
.../apache/myfaces/el/unified/FacesELContext.java | 6 ------
.../myfaces/webapp/Jsp21FacesInitializer.java | 4 ++--
5 files changed, 25 insertions(+), 17 deletions(-)
diff --git a/api/src/main/java/javax/faces/event/ExceptionQueuedEventContext.java b/api/src/main/java/javax/faces/event/ExceptionQueuedEventContext.java
index a2afe68..750a721 100644
--- a/api/src/main/java/javax/faces/event/ExceptionQueuedEventContext.java
+++ b/api/src/main/java/javax/faces/event/ExceptionQueuedEventContext.java
@@ -31,8 +31,6 @@ import javax.faces.context.FacesContext;
*/
public class ExceptionQueuedEventContext implements SystemEventListenerHolder
{
- // TODO: -=Leonardo Uribe=- This type of constants should be the same
- // for ri and myfaces, to keep binary compatibility and pass TCK test.
public static final String IN_AFTER_PHASE_KEY = ExceptionQueuedEventContext.class.getName() + ".IN_AFTER_PHASE";
public static final String IN_BEFORE_PHASE_KEY = ExceptionQueuedEventContext.class.getName() + ".IN_BEFORE_PHASE";
@@ -88,6 +86,7 @@ public class ExceptionQueuedEventContext implements SystemEventListenerHolder
/**
* {@inheritDoc}
*/
+ @Override
public List<SystemEventListener> getListenersForEventClass(Class<? extends SystemEvent> facesEventClass)
{
return Collections.singletonList((SystemEventListener)getContext().getExceptionHandler());
@@ -100,11 +99,11 @@ public class ExceptionQueuedEventContext implements SystemEventListenerHolder
public boolean inAfterPhase()
{
- return (_attributes != null && _attributes.containsKey(IN_AFTER_PHASE_KEY));
+ return _attributes != null && _attributes.containsKey(IN_AFTER_PHASE_KEY);
}
public boolean inBeforePhase()
{
- return (_attributes != null && _attributes.containsKey(IN_BEFORE_PHASE_KEY));
+ return _attributes != null && _attributes.containsKey(IN_BEFORE_PHASE_KEY);
}
}
diff --git a/api/src/main/java/javax/faces/render/ResponseStateManager.java b/api/src/main/java/javax/faces/render/ResponseStateManager.java
index 09e1798..f708410 100755
--- a/api/src/main/java/javax/faces/render/ResponseStateManager.java
+++ b/api/src/main/java/javax/faces/render/ResponseStateManager.java
@@ -86,8 +86,6 @@ public abstract class ResponseStateManager
*/
public String getViewState(FacesContext context, Object state)
{
- // TODO: IMPLEMENT HERE
-
return null;
}
@@ -97,12 +95,30 @@ public abstract class ResponseStateManager
public Object getState(FacesContext context, String viewId)
{
Object[] structureAndState = new Object[2];
- structureAndState[0] = null; //getTreeStructureToRestore(context, viewId);
- structureAndState[1] = null; //getComponentStateToRestore(context);
+ structureAndState[0] = getTreeStructureToRestore(context, viewId);
+ structureAndState[1] = getComponentStateToRestore(context);
return structureAndState;
}
/**
+ * @deprecated
+ */
+ @Deprecated
+ public Object getTreeStructureToRestore(FacesContext context, String viewId)
+ {
+ return null;
+ }
+
+ /**
+ * @deprecated
+ */
+ @Deprecated
+ public Object getComponentStateToRestore(FacesContext context)
+ {
+ return null;
+ }
+
+ /**
* Checks if the current request is a postback
*
* @since 1.2
diff --git a/api/src/main/java/javax/faces/view/facelets/FaceletContext.java b/api/src/main/java/javax/faces/view/facelets/FaceletContext.java
index 7bc54cf..395fb64 100644
--- a/api/src/main/java/javax/faces/view/facelets/FaceletContext.java
+++ b/api/src/main/java/javax/faces/view/facelets/FaceletContext.java
@@ -39,7 +39,6 @@ import javax.faces.context.FacesContext;
*/
public abstract class FaceletContext extends ELContext
{
- // TODO: REPORT this aberration to the EG
public static final String FACELET_CONTEXT_KEY = "javax.faces.FACELET_CONTEXT".intern();
/**
diff --git a/impl/src/main/java/org/apache/myfaces/el/unified/FacesELContext.java b/impl/src/main/java/org/apache/myfaces/el/unified/FacesELContext.java
index c08b5d9..f6da7fd 100644
--- a/impl/src/main/java/org/apache/myfaces/el/unified/FacesELContext.java
+++ b/impl/src/main/java/org/apache/myfaces/el/unified/FacesELContext.java
@@ -31,7 +31,6 @@ import javax.faces.context.FacesContext;
*/
public class FacesELContext extends ELContext
{
-
private ELResolver _elResolver;
private FunctionMapper _functionMapper;
private VariableMapper _variableMapper;
@@ -40,11 +39,6 @@ public class FacesELContext extends ELContext
{
this._elResolver = elResolver;
putContext(FacesContext.class, facesContext);
-
- // TODO: decide if we need to implement our own FunctionMapperImpl and
- // VariableMapperImpl instead of relying on Tomcat's version.
- // this.functionMapper = new FunctionMapperImpl();
- // this.variableMapper = new VariableMapperImpl();
}
@Override
diff --git a/impl/src/main/java/org/apache/myfaces/webapp/Jsp21FacesInitializer.java b/impl/src/main/java/org/apache/myfaces/webapp/Jsp21FacesInitializer.java
index 3e9473a..eaf63b4 100644
--- a/impl/src/main/java/org/apache/myfaces/webapp/Jsp21FacesInitializer.java
+++ b/impl/src/main/java/org/apache/myfaces/webapp/Jsp21FacesInitializer.java
@@ -77,8 +77,8 @@ public class Jsp21FacesInitializer extends AbstractFacesInitializer
{
if (jspFactory == null)
{
- // TODO: this Class.forName will be removed when Tomcat fixes a bug
- // also, we should then be able to remove jasper.jar from the deployment
+ // workaround for Tomcat
+ // JspFactory.getDefaultFactory() will return null unless JspRuntimeContext was initialized
try
{
Class.forName("org.apache.jasper.compiler.JspRuntimeContext");