Author: pbenedict
Date: Sun Dec 21 11:00:02 2008
New Revision: 728476
URL: http://svn.apache.org/viewvc?rev=728476&view=rev
Log:
STR-3169: Add @throws IllegalStateException
Modified:
struts/struts1/branches/STRUTS_1_3_BRANCH/core/src/main/java/org/apache/struts/config/ActionConfigMatcher.java
Modified:
struts/struts1/branches/STRUTS_1_3_BRANCH/core/src/main/java/org/apache/struts/config/ActionConfigMatcher.java
URL:
http://svn.apache.org/viewvc/struts/struts1/branches/STRUTS_1_3_BRANCH/core/src/main/java/org/apache/struts/config/ActionConfigMatcher.java?rev=728476&r1=728475&r2=728476&view=diff
==============================================================================
---
struts/struts1/branches/STRUTS_1_3_BRANCH/core/src/main/java/org/apache/struts/config/ActionConfigMatcher.java
(original)
+++
struts/struts1/branches/STRUTS_1_3_BRANCH/core/src/main/java/org/apache/struts/config/ActionConfigMatcher.java
Sun Dec 21 11:00:02 2008
@@ -152,6 +152,8 @@
* @param vars A Map of wildcard-matched strings
* @return A cloned ActionConfig with appropriate properties replaced with
* wildcard-matched values
+ * @throws IllegalStateException if a placeholder substitution is
+ * impossible due to recursion
*/
protected ActionConfig convertActionConfig(String path, ActionConfig orig,
Map vars) {
@@ -231,6 +233,8 @@
* @param orig The original properties set with placehold values
* @param props The target properties to store the processed values
* @param vars A Map of wildcard-matched strings
+ * @throws IllegalStateException if a placeholder substitution is
+ * impossible due to recursion
*/
protected void replaceProperties(Properties orig, Properties props, Map
vars) {
Map.Entry entry = null;
@@ -249,6 +253,8 @@
* @param val The value to convert
* @param vars A Map of wildcard-matched strings
* @return The new value
+ * @throws IllegalStateException if a placeholder substitution is
+ * impossible due to recursion
*/
protected String convertParam(String val, Map vars) {
if (val == null) {
@@ -272,7 +278,7 @@
// Prevent an infinite loop by retaining the placeholders
// that contain itself in the substitution value
if (((String) entry.getValue()).contains(keyStr)) {
- throw new IllegalStateException();
+ throw new IllegalStateException();
}
// Replace all instances of the placeholder