[jboss-cvs] JBossAS SVN: r88929 - projects/fresh/trunk/fresh-shell/src/main/java/org/jboss/fresh/shell/commands.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri May 15 06:17:34 EDT 2009


Author: alesj
Date: 2009-05-15 06:17:34 -0400 (Fri, 15 May 2009)
New Revision: 88929

Modified:
   projects/fresh/trunk/fresh-shell/src/main/java/org/jboss/fresh/shell/commands/MBeanInvokeExe.java
Log:
Extract msg.

Modified: projects/fresh/trunk/fresh-shell/src/main/java/org/jboss/fresh/shell/commands/MBeanInvokeExe.java
===================================================================
--- projects/fresh/trunk/fresh-shell/src/main/java/org/jboss/fresh/shell/commands/MBeanInvokeExe.java	2009-05-15 08:08:11 UTC (rev 88928)
+++ projects/fresh/trunk/fresh-shell/src/main/java/org/jboss/fresh/shell/commands/MBeanInvokeExe.java	2009-05-15 10:17:34 UTC (rev 88929)
@@ -1,17 +1,16 @@
 package org.jboss.fresh.shell.commands;
 
 import java.io.PrintWriter;
+import java.util.Iterator;
 import java.util.Set;
-import java.util.Iterator;
+import javax.management.MBeanInfo;
 import javax.management.MBeanServer;
 import javax.management.MBeanServerFactory;
+import javax.management.ObjectInstance;
 import javax.management.ObjectName;
-import javax.management.ObjectInstance;
-import javax.management.MBeanInfo;
 
 import org.apache.log4j.Logger;
 import org.jboss.fresh.io.BufferObjectWriter;
-import org.jboss.beans.metadata.api.annotations.Bean;
 
 
 public class MBeanInvokeExe extends AbstractInvokeExe {
@@ -45,14 +44,15 @@
       }
       else
       {
+         String message = "The specified MBean is not registered: " + mbeanName;
          // error bean not found
          if (canThrowEx())
          {
-            throw new Exception("The specified MBean is not registered: " + mbeanName);
+            throw new Exception(message);
          }
          else
          {
-            out.println("The specified MBean is not registered: " + mbeanName);
+            out.println(message);
          }
       }
    }




More information about the jboss-cvs-commits mailing list