diff --git a/bindings/java/src/net/hyperic/sigar/jmx/SigarInvokerJMX.java b/bindings/java/src/net/hyperic/sigar/jmx/SigarInvokerJMX.java index 2c3ed3e4..af2e4c36 100644 --- a/bindings/java/src/net/hyperic/sigar/jmx/SigarInvokerJMX.java +++ b/bindings/java/src/net/hyperic/sigar/jmx/SigarInvokerJMX.java @@ -42,6 +42,12 @@ public class SigarInvokerJMX extends SigarInvoker { SigarInvokerJMX invoker; + int ix = name.indexOf(":"); + if (ix > 0) { + //skip domain name + name = name.substring(ix + 1); + } + if ((invoker = (SigarInvokerJMX)cache.get(name)) != null) { return invoker; } @@ -50,12 +56,6 @@ public class SigarInvokerJMX extends SigarInvoker { invoker.setProxy(proxy); - int ix = name.indexOf(":"); - if (ix > 0) { - //skip domain name - name = name.substring(ix + 1); - } - StringTokenizer st = new StringTokenizer(name, ","); while (st.hasMoreTokens()) {