diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2010-01-29 14:09:57 +0100 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2010-01-29 14:09:57 +0100 |
commit | 36c6c955b8de37162aaf076f55c5af4d94bdd84e (patch) | |
tree | 95db1854281c1c8ab675bef77f681f1cb7d74d72 /desktop | |
parent | d1fc940995d8c0735e1ac817a6ee3a097ea3c4d8 (diff) | |
parent | 0f26adb46fc7d371c686089c674d408c93f36771 (diff) |
CWS-TOOLING: integrate CWS fwk136_DEV300
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/registration/com/sun/star/servicetag/SystemEnvironment.java | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/desktop/source/registration/com/sun/star/servicetag/SystemEnvironment.java b/desktop/source/registration/com/sun/star/servicetag/SystemEnvironment.java index 4628034723e1..e920bc098219 100644 --- a/desktop/source/registration/com/sun/star/servicetag/SystemEnvironment.java +++ b/desktop/source/registration/com/sun/star/servicetag/SystemEnvironment.java @@ -95,12 +95,12 @@ public class SystemEnvironment { this.systemManufacturer = ""; this.cpuManufacturer = ""; this.serialNumber = ""; - this.physmem = ""; - this.sockets = ""; - this.cores = ""; - this.virtcpus = ""; + this.physmem = "0"; + this.sockets = "0"; + this.cores = "0"; + this.virtcpus = "0"; this.cpuname = ""; - this.clockrate = ""; + this.clockrate = "0"; } @@ -173,6 +173,8 @@ public class SystemEnvironment { * @param physmem The physmem to set. */ public void setPhysMem(String physmem) { + if (physmem.length() == 0) + physmem = "0"; this.physmem = physmem; } @@ -181,6 +183,8 @@ public class SystemEnvironment { * @param sockets The sockets to set. */ public void setSockets(String sockets) { + if (sockets.length() == 0) + sockets = "0"; this.sockets = sockets; } @@ -189,6 +193,8 @@ public class SystemEnvironment { * @param cores The cores to set. */ public void setCores(String cores) { + if (cores.length() == 0) + cores ="0"; this.cores = cores; } @@ -197,6 +203,8 @@ public class SystemEnvironment { * @param virtcpus The virtcpus to set. */ public void setVirtCpus(String virtcpus) { + if (virtcpus.length() == 0) + virtcpus = "0"; this.virtcpus = virtcpus; } @@ -213,9 +221,14 @@ public class SystemEnvironment { * @param clockrate The clockrate to set. */ public void setClockRate(String clockrate) { - Float f = Float.parseFloat(clockrate); - Integer nClockrate = f.intValue(); - this.clockrate = nClockrate.toString(); + if (clockrate.length() == 0) + this.clockrate = "0"; + else + { + Float f = Float.parseFloat(clockrate); + Integer nClockrate = f.intValue(); + this.clockrate = nClockrate.toString(); + } } /** |