Skip to content

Commit 269e04a

Browse files
committed
fix(lib): Skip software if name not available
Signed-off-by: stonebuzz <skita@teclib.com>
1 parent ebad1a6 commit 269e04a

File tree

1 file changed

+4
-1
lines changed
  • inventory/src/main/java/org/flyve/inventory/categories

1 file changed

+4
-1
lines changed

inventory/src/main/java/org/flyve/inventory/categories/Software.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ public Software(Context xCtx) {
100100

101101
Category c = new Category("SOFTWARES", "softwares");
102102

103-
c.put("NAME", new CategoryValue(getName(p), "NAME", "name"));
103+
softwareName = getName(p);
104+
if(softwareName.equals("N/A")) continue; // Skip software if name is not available
105+
106+
c.put("NAME", new CategoryValue(softwareName, "NAME", "name"));
104107
c.put("COMMENTS", new CategoryValue(getPackage(p), "COMMENTS", "comments"));
105108
c.put("VERSION", new CategoryValue(getVersion(p), "VERSION", "version"));
106109
c.put("FILESIZE", new CategoryValue(getFileSize(p), "FILESIZE", "fileSize"));

0 commit comments

Comments
 (0)