modules/core/domain/src/main/java/org/rhq/core/domain/configuration/ConfigurationUtility.java
| 13 ++++------
1 file changed, 6 insertions(+), 7 deletions(-)
New commits:
commit 8a0e879aa7505a27695af642d28fa71748281e6d
Author: Thomas Segismont <tsegismo(a)redhat.com>
Date: Tue Aug 27 14:58:58 2013 +0200
Bug 1000006 - [JBossAS7] - it is possible to create an XA datasource even without
required property
Replace String.format with String concatenation in core domain class as String.format
is not emulated by Gwt
diff --git
a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/ConfigurationUtility.java
b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/ConfigurationUtility.java
index fa9224b..f4d575a 100644
---
a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/ConfigurationUtility.java
+++
b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/ConfigurationUtility.java
@@ -342,15 +342,14 @@ public class ConfigurationUtility {
}
int listSize = propertyList.getList().size();
if (listMin == 0 && listMax < Integer.MAX_VALUE && listSize
> listMax) {
- errorMessages.add(String.format("The list property '%s' should
contain %d row(s) at most",
- propertyDefinitionList.getName(), listMax));
+ errorMessages.add("The list property '" +
propertyDefinitionList.getName() + "' should contain " + listMax
+ + " row(s) at most");
} else if (listMin > 0 && listMax == Integer.MAX_VALUE &&
listSize < listMin) {
- errorMessages.add(String.format("The list property '%s' should
contain at least %d row(s)",
- propertyDefinitionList.getName(), listMin));
+ errorMessages.add("The list property '" +
propertyDefinitionList.getName() + "' should contain at least "
+ + listMin + " row(s)");
} else if (listSize < listMin || listSize > listMax) {
- errorMessages.add(String.format(
- "The list property '%s' should contain a minimum of %d and a
maximum of %d row(s)",
- propertyDefinitionList.getName(), listMin, listMax));
+ errorMessages.add("The list property '%s' should contain a
minimum of " + listMin + " and a maximum of "
+ + listMax + " row(s)");
}
}
}
Show replies by date