dont need to lc index

This commit is contained in:
Doug MacEachern 2007-03-06 00:29:40 +00:00
parent ebf212248e
commit 3345613037
1 changed files with 3 additions and 4 deletions

View File

@ -124,13 +124,12 @@ public class Pdh extends Win32 {
//called by RegistryKey.getMultiStringValue //called by RegistryKey.getMultiStringValue
//format description see: http://support.microsoft.com/kb/q287159/ //format description see: http://support.microsoft.com/kb/q287159/
public boolean add(Object o) { public boolean add(Object o) {
o = ((String)o).trim().toLowerCase();
if (index == null) { if (index == null) {
index = (String)o; index = (String)o;
return true; return true;
} }
int[] ix = String name = ((String)o).trim().toLowerCase();
(int[])this.map.get(o); int[] ix = (int[])this.map.get(name);
if (ix == null) { if (ix == null) {
ix = new int[1]; ix = new int[1];
} }
@ -141,7 +140,7 @@ public class Pdh extends Win32 {
} }
ix[0] = Integer.parseInt(index); ix[0] = Integer.parseInt(index);
//name -> index //name -> index
this.map.put(o, ix); this.map.put(name, ix);
index = null; //reset index = null; //reset
return true; return true;
} }