You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ar...@apache.org on 2012/02/09 22:55:17 UTC
svn commit: r1242548 -
/myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponent.java
Author: arobinson74
Date: Thu Feb 9 21:55:17 2012
New Revision: 1242548
URL: http://svn.apache.org/viewvc?rev=1242548&view=rev
Log:
TRINIDAD-2203 - Add a system property check to allow the contextual changes to be errors without code changes
Modified:
myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponent.java
Modified: myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponent.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponent.java?rev=1242548&r1=1242547&r2=1242548&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponent.java (original)
+++ myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponent.java Thu Feb 9 21:55:17 2012
@@ -1437,13 +1437,13 @@ abstract public class UIXComponent exten
String errorMessage = _LOG.getMessage(bundleKey,
new Object[] { getClientId(), originalStackTrace });
- if (_WARNING_INSTEAD_OF_EXCEPTION_FOR_CONTEXT_ISSUES)
+ if (_treatContextualIssuesAsErrors)
{
- _LOG.warning(errorMessage);
+ throw new IllegalStateException(errorMessage);
}
else
{
- throw new IllegalStateException(errorMessage);
+ _LOG.warning(errorMessage);
}
}
@@ -1571,7 +1571,7 @@ abstract public class UIXComponent exten
}
// Use logging for now until all issues are resolved
- private final static boolean _WARNING_INSTEAD_OF_EXCEPTION_FOR_CONTEXT_ISSUES = true;
+ private final static boolean _treatContextualIssuesAsErrors;
private final static boolean _inTestingPhase;
private static final TrinidadLogger _LOG =
TrinidadLogger.createTrinidadLogger(UIXComponent.class);
@@ -1604,6 +1604,9 @@ abstract public class UIXComponent exten
_LOG.info("Application is running in testing phase, UIXComponent will " +
"perform extra validation steps to ensure proper component usage");
}
+
+ _treatContextualIssuesAsErrors = "true".equals(
+ System.getProperty("uixcomponent.contextual.issue.throw"));
};
private String _setupVisitingCaller;