[ooo-build-commit] Branch 'ooo/OOO320' - 2 commits - desktop/source

Jan Holesovsky kendy at kemper.freedesktop.org
Thu Jan 14 20:25:43 PST 2010


 desktop/source/registration/com/sun/star/servicetag/SystemEnvironment.java        |   29 +++++++---
 desktop/source/registration/com/sun/star/servicetag/WindowsSystemEnvironment.java |    4 +
 2 files changed, 24 insertions(+), 9 deletions(-)

New commits:
commit 51d8da865527e217bca900f9022f849323f50427
Author: Release Engineers <releng at openoffice.org>
Date:   Thu Jan 14 09:49:20 2010 +0000

    #i108263# fix for registration windows

diff --git a/desktop/source/registration/com/sun/star/servicetag/WindowsSystemEnvironment.java b/desktop/source/registration/com/sun/star/servicetag/WindowsSystemEnvironment.java
index ec391d8..483369a 100644
--- a/desktop/source/registration/com/sun/star/servicetag/WindowsSystemEnvironment.java
+++ b/desktop/source/registration/com/sun/star/servicetag/WindowsSystemEnvironment.java
@@ -125,7 +125,9 @@ class WindowsSystemEnvironment extends SystemEnvironment {
 
     private String getWindowsPhysMem() {
         String mem = getWmicResult("computersystem", "get", "TotalPhysicalMemory");
-        long l = Long.parseLong(mem);
+        long l = 0;
+        if (mem.length()>0)
+            Long.parseLong(mem);
         return "" + ((long) (l / (1024*1024)));
     }
 
commit 549e13cfc0a2ba551f9d8ac6b9d21045d16c734f
Author: Oliver Bolte <obo at openoffice.org>
Date:   Thu Jan 14 09:08:51 2010 +0000

    CWS-TOOLING: integrate CWS fwk136
    2010-01-12 14:48:41 +0100 cd  r277899 : #108263# Fix problem with empty system values which need to be intergers. Use 0 to reflect unknown.

diff --git a/desktop/source/registration/com/sun/star/servicetag/SystemEnvironment.java b/desktop/source/registration/com/sun/star/servicetag/SystemEnvironment.java
index badf5bb..d218650 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();
+        }
     }
 
     /**


More information about the ooo-build-commit mailing list