From daa66b7237b12f1d4837765ddef401ec8717c424 Mon Sep 17 00:00:00 2001
From: Kelly Kelly <kelly@basistech.com>
Date: Tue, 1 Mar 2022 11:49:14 -0500
Subject: [PATCH] Cleaned up a bit

---
 .../recentactivity/ExtractRegistry.java       | 40 ++++++++++++++-----
 1 file changed, 30 insertions(+), 10 deletions(-)

diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java
index c2cd7dd280..5448a3a7e5 100644
--- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java
+++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java
@@ -2409,43 +2409,63 @@ void createOSInfo() {
         }
 
         void setCompName(String compName) {
-            this.compName = compName;
+            if(this.compName == null || this.compName.isEmpty()) {
+                this.compName = compName;
+            }
         }
 
         void setOsName(String progName) {
-            this.progName = progName;
+            if(this.progName == null || this.progName.isEmpty()) {
+                this.progName = progName;
+            }
         }
 
         void setProcessorArchitecture(String processorArchitecture) {
-            this.processorArchitecture = processorArchitecture;
+            if(this.processorArchitecture == null || this.processorArchitecture.isEmpty()) {
+                this.processorArchitecture = processorArchitecture;
+            }
         }
 
         void setTempDir(String tempDir) {
-            this.tempDir = tempDir;
+            if(this.tempDir == null || this.tempDir.isEmpty()) {
+                this.tempDir = tempDir;
+            }
         }
 
         void setDomain(String domain) {
-            this.domain = domain;
+            if(this.domain == null || this.domain.isEmpty()) {
+                this.domain = domain;
+            }
         }
 
         void setInstalltime(Long installtime) {
-            this.installtime = installtime;
+            if(this.domain == null) {
+                this.installtime = installtime;
+            }
         }
 
         void setSystemRoot(String systemRoot) {
-            this.systemRoot = systemRoot;
+            if(this.systemRoot == null || this.systemRoot.isEmpty()) {
+                this.systemRoot = systemRoot;
+            }
         }
 
         void setProductId(String productId) {
-            this.productId = productId;
+            if(this.productId == null || this.productId.isEmpty()) {
+                this.productId = productId;
+            }
         }
 
         void setRegOwner(String regOwner) {
-            this.regOwner = regOwner;
+            if(this.regOwner == null || this.regOwner.isEmpty()) {
+                this.regOwner = regOwner;
+            }
         }
 
         public void setRegOrg(String regOrg) {
-            this.regOrg = regOrg;
+            if(this.regOrg == null || this.regOrg.isEmpty()) {
+                this.regOrg = regOrg;
+            }
         } 
     }
 
-- 
GitLab