Author: mfreedman
Date: Sat Jun 11 20:49:51 2011
New Revision: 1134753
URL: http://svn.apache.org/viewvc?rev=1134753&view=rev
Log:
PORTLETBRIDGE-214: Bridge NPE logging Exception in resource request if exception during/prior
to getting FacesContext
Modified:
myfaces/portlet-bridge/core/branches/2.0.0-branch/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java
Modified: myfaces/portlet-bridge/core/branches/2.0.0-branch/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/2.0.0-branch/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java?rev=1134753&r1=1134752&r2=1134753&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/2.0.0-branch/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java
(original)
+++ myfaces/portlet-bridge/core/branches/2.0.0-branch/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java
Sat Jun 11 20:49:51 2011
@@ -699,7 +699,7 @@ public class BridgeImpl
}
catch (Exception e)
{
- if (!mDebugLoggingEnabled.booleanValue())
+ if (mDebugLoggingEnabled.booleanValue())
mPortletConfig.getPortletContext().log("Exception thrown in doFacesRequest:event",
e);
if (!(e instanceof BridgeException))
@@ -910,7 +910,7 @@ public class BridgeImpl
// get context as it may have been reacquired if exception occurred during redirect
during render.
context = FacesContext.getCurrentInstance();
- if (!mDebugLoggingEnabled.booleanValue())
+ if (mDebugLoggingEnabled.booleanValue())
mPortletConfig.getPortletContext().log("Exception thrown in doFacesRequest:render",
e);
if (!(e instanceof BridgeException))
@@ -1048,7 +1048,7 @@ public class BridgeImpl
if (scopeId == null)
{
- if (!mDebugLoggingEnabled.booleanValue())
+ if (mDebugLoggingEnabled.booleanValue())
context.getExternalContext().log("WARNING: Unexpected situation -- reached end of
internal doFacesRender without a scopeId");
// Don't expect to get here -- but just create a new scope
@@ -1164,9 +1164,9 @@ public class BridgeImpl
}
catch (Exception e)
{
- if (!mDebugLoggingEnabled.booleanValue())
- context.getExternalContext().log("Exception thrown in doFacesRequest:resource", e);
-
+ if (mDebugLoggingEnabled.booleanValue())
+ mPortletConfig.getPortletContext().log("Exception thrown in doFacesRequest:resource",
e);
+
if (!(e instanceof BridgeException))
{
e = new BridgeException(e);
@@ -1175,7 +1175,7 @@ public class BridgeImpl
}
finally
{
- dumpScopeId(scopeId, "RENDER_PHASE");
+ dumpScopeId(scopeId, "RESOURCE_PHASE");
if (context != null)
{
|