From 9965f09f1c4a5c7e29287511c8aa3509a29cff6e Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Wed, 1 Mar 2006 22:08:12 +0000 Subject: [PATCH] fix cache --- .../src/net/hyperic/sigar/jmx/SigarInvokerJMX.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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()) {