SPR-5615 - Improved error message: s/is no interface/is not an interface

This commit is contained in:
Chris Beams 2009-03-26 13:56:14 +00:00
parent 88e336cf56
commit 77b2c4e199
1 changed files with 3 additions and 2 deletions

View File

@ -88,9 +88,10 @@ public class InterfaceBasedMBeanInfoAssembler extends AbstractConfigurableMBeanI
*/
public void setManagedInterfaces(Class[] managedInterfaces) {
if (managedInterfaces != null) {
for (Class ifc : managedInterfaces) {
for (Class<?> ifc : managedInterfaces) {
if (!ifc.isInterface()) {
throw new IllegalArgumentException("Management interface [" + ifc.getName() + "] is no interface");
throw new IllegalArgumentException(
"Management interface [" + ifc.getName() + "] is not an interface");
}
}
}