removed unsafe java 5 methods to maintain 1.4 runtime compatibility

This commit is contained in:
Scott Andrews
2008-10-29 15:52:36 +00:00
parent d153ee0c0c
commit 5249645677
4 changed files with 5 additions and 4 deletions

View File

@@ -45,7 +45,7 @@ public class AjaxEventInterceptorRenderer extends DojoDecorationRenderer {
ResponseWriter writer = context.getResponseWriter();
String processIds = (String) component.getAttributes().get("processIds");
if (StringUtils.hasText(processIds) && !processIds.contains(component.getClientId(context))) {
if (StringUtils.hasText(processIds) && processIds.indexOf(component.getClientId(context)) == -1) {
processIds = component.getClientId(context) + ", " + processIds;
} else if (!StringUtils.hasText(processIds)) {
processIds = component.getClientId(context);

View File

@@ -161,7 +161,7 @@ public class AjaxViewRoot extends DelegatingViewRoot {
FacesContext context = FacesContext.getCurrentInstance();
String processIdsParam = (String) context.getExternalContext().getRequestParameterMap().get(
PROCESS_IDS_PARAM);
if (StringUtils.hasText(processIdsParam) && processIdsParam.contains(PROCESS_ALL)) {
if (StringUtils.hasText(processIdsParam) && processIdsParam.indexOf(PROCESS_ALL) != -1) {
processIds = new String[] { getOriginalViewRoot().getClientId(context) };
} else {
processIds = StringUtils.delimitedListToStringArray(processIdsParam, ",", " ");

View File

@@ -77,7 +77,7 @@ public class ProgressiveCommandButtonRenderer extends BaseDojoComponentRenderer
Boolean ajaxEnabled = (Boolean) component.getAttributes().get("ajaxEnabled");
String processIds = (String) component.getAttributes().get("processIds");
if (Boolean.TRUE.equals(ajaxEnabled)) {
if (StringUtils.hasText(processIds) && !processIds.contains(component.getClientId(context))) {
if (StringUtils.hasText(processIds) && processIds.indexOf(component.getClientId(context)) == -1) {
processIds = component.getClientId(context) + ", " + processIds;
} else if (!StringUtils.hasText(processIds)) {
processIds = component.getClientId(context);

View File

@@ -106,7 +106,8 @@ public class FlowDefinitionResourceFactory {
try {
resource = resourceLoader.getResource(basePath).createRelative(path);
} catch (IOException e) {
throw new IllegalStateException("The base path cannot be resolved from '" + basePath + "'", e);
throw new IllegalStateException("The base path cannot be resolved from '" + basePath + "': "
+ e.getMessage());
}
}
if (flowId == null || flowId.length() == 0) {