You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mf...@apache.org on 2011/06/16 19:44:09 UTC
svn commit: r1136564 - in /myfaces/portlet-bridge/core/branches/trunk_2.0.x:
./ impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java
Author: mfreedman
Date: Thu Jun 16 17:44:09 2011
New Revision: 1136564
URL: http://svn.apache.org/viewvc?rev=1136564&view=rev
Log:
PORTLETBRIDGE-214: BridgeImpl NPE while logging exception if FacesContext not active.
Note: Also fixed a number of incorrect conditionals where we only logged these exceptions if logging was disabled.
Modified:
myfaces/portlet-bridge/core/branches/trunk_2.0.x/ (props changed)
myfaces/portlet-bridge/core/branches/trunk_2.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java
Propchange: myfaces/portlet-bridge/core/branches/trunk_2.0.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun 16 17:44:09 2011
@@ -1 +1 @@
-/myfaces/portlet-bridge/core/branches/2.0.0-branch:1099967,1131166
+/myfaces/portlet-bridge/core/branches/2.0.0-branch:1099967,1131166,1134753
Modified: myfaces/portlet-bridge/core/branches/trunk_2.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/trunk_2.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java?rev=1136564&r1=1136563&r2=1136564&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/trunk_2.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java (original)
+++ myfaces/portlet-bridge/core/branches/trunk_2.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java Thu Jun 16 17:44:09 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)
{