org.jboss.as.controller.ControllerMessages.MESSAGES-s



API Populatity

1 Client projects

Project: org.jboss

Package: org.jboss.as

Project wildfly/wildfly in file ...ller.descriptions.common.InterfaceDescription.java (2011-11-03)
@@ -21,6 +21,7 @@
  */
 package org.jboss.as.controller.descriptions.common;
 
+import static org.jboss.as.controller.ControllerMessages.MESSAGES;
 import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
 import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ALTERNATIVES;
 import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIPTION;
@@ -352,7 +353,7 @@ public class InterfaceDescription {
                         final ModelNode v = value.get(name);
                         if(def.getType() == ModelType.STRING) {
                             if (ModelType.LIST != v.getType()) {
-                                throw new OperationFailedException(new ModelNode().set("invalid type " + v.getType()));
+                                throw new OperationFailedException(new ModelNode().set(MESSAGES.invalidType(v.getType())));
                             }
                         } else {
                             def.getValidator().validateParameter(name, v);
Project wildfly/wildfly in file ...as.controller.interfaces.AnyInterfaceCriteria.java (2011-11-03)
@@ -9,6 +9,8 @@ import java.net.SocketException;
 import java.util.HashSet;
 import java.util.Set;
 
+import static org.jboss.as.controller.ControllerMessages.MESSAGES;
+
 /**
  * {@link InterfaceCriteria} that tests whether a given network interface and
  * address satisfy <i>any</i> of a contained set of {@link InterfaceCriteria}.
@@ -31,7 +33,7 @@ public class AnyInterfaceCriteria implements InterfaceCriteria {
      */
     public AnyInterfaceCriteria(Set<InterfaceCriteria> criteria) {
         if (criteria == null)
-            throw new IllegalArgumentException("criteria is null");
+            throw MESSAGES.nullVar("criteria");
         this.criteria.addAll(criteria);
     }
 
Project wildfly/wildfly in file ...as.controller.interfaces.NicInterfaceCriteria.java (2011-11-03)
@@ -7,6 +7,8 @@ import java.net.InetAddress;
 import java.net.NetworkInterface;
 import java.net.SocketException;
 
+import static org.jboss.as.controller.ControllerMessages.MESSAGES;
+
 /**
  * {@link InterfaceCriteria} that tests whether a given name matches the
  * network interface's {@link NetworkInterface#getName() name}.
@@ -29,7 +31,7 @@ public class NicInterfaceCriteria implements InterfaceCriteria {
      */
     public NicInterfaceCriteria(String name) {
         if (name == null)
-            throw new IllegalArgumentException("name is null");
+            throw MESSAGES.nullVar("name");
         this.name = name;
     }