Skip to content

Commit 9e24d80

Browse files
committed
filter update 3
1 parent 76b2959 commit 9e24d80

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

src/client/filter/Filter.java

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,30 +82,50 @@ public synchronized List<DataTuple> filterdata()
8282
if((s.trim().contains("\"DisplayName\"=")))
8383
{
8484
//System.out.println(s);
85-
String[] g = s.trim().split("\"DisplayName\"=");
85+
String[] g = null;
86+
try {
87+
g = s.trim().split("\"DisplayName\"=");
88+
name = (g[1].substring(1, g[1].length()-1).trim());
89+
}catch(Exception e)
90+
{
91+
name = "";
92+
}
8693
//System.out.println(g[1].substring(1, g[1].length()-1));
87-
name = (g[1].substring(1, g[1].length()-1).trim());
94+
8895
} else {
8996
}
9097

9198
if((s.trim().contains("\"DisplayVersion\"=")))
9299
{
93100
//System.out.println(s);
94-
String[] g = s.trim().split("\"DisplayVersion\"=");
101+
102+
String[] g = null;
103+
try{
104+
g = s.trim().split("\"DisplayVersion\"=");
95105
//System.out.println(g[1].substring(1, g[1].length()-1));
96106
ver = (g[1].substring(1, g[1].length()-1).trim());
107+
}catch(Exception e)
108+
{
109+
ver = "";
110+
}
97111
} else {
98112
}
99113

100114
if((s.trim().contains("\"InstallDate\"=")))
101115
{
102116
//System.out.println(s);
103-
String[] g = s.trim().split("\"InstallDate\"=");
117+
String[] g = null;
118+
try{
119+
g = s.trim().split("\"InstallDate\"=");
104120
String tr = "";//System.out.println(g[1].substring(1, g[1].length()-1));
105121

106122
tr = (g[1].substring(1, g[1].length()-1).trim());
107123

108124
date = LocalDate.of(new Integer(tr.substring(0, 4)).intValue(), new Integer(tr.substring(4, 6)).intValue(), new Integer(tr.substring(6)).intValue());
125+
}catch(Exception e)
126+
{
127+
date = null;
128+
}
109129
} else {
110130
}
111131
}

0 commit comments

Comments
 (0)