@@ -55,6 +55,47 @@ private List<String> extractStringArray(JSONObject obj, String arrayName) throws
55
55
return items ;
56
56
}
57
57
58
+ private class VulnObject {
59
+ String CVEorID ;
60
+ String description ;
61
+ String impact ;
62
+ String CVSSV2Score ;
63
+ String CVEDate ;
64
+ String [] externalLinks ;
65
+ String [] altNames ;
66
+ String [] patches ;
67
+
68
+ private VulnObject (String cve ,
69
+ String desc ,
70
+ String impact ,
71
+ String cvssv2 ,
72
+ String cveDate ,
73
+ String [] externLinks ,
74
+ String [] altNames ,
75
+ String [] patches ){
76
+ this .CVEorID = cve ;
77
+ this .description = desc ;
78
+ this .impact = impact ;
79
+ this .CVSSV2Score = cvssv2 ;
80
+ this .CVEDate = cveDate ;
81
+ this .externalLinks = externLinks ;
82
+ this .altNames = altNames ;
83
+ this .patches = patches ;
84
+ }
85
+
86
+ public static VulnObject getDescriptorObject (String cve ,
87
+ String desc ,
88
+ String impact ,
89
+ String cvssv2 ,
90
+ String cveDate ,
91
+ String [] externLinks ,
92
+ String [] altNames ,
93
+ String [] patches ){
94
+ VulnObject vo = new VulnObject (cve , desc , impact ,cvssv2 ,cveDate ,externLinks ,altNames ,patches );
95
+ return vo ;
96
+ }
97
+ }
98
+
58
99
@ Override
59
100
public void onBindViewHolder (RecyclerView .ViewHolder viewHolder , int position ) {
60
101
RecyclerItemViewHolder holder = (RecyclerItemViewHolder ) viewHolder ;
@@ -102,12 +143,28 @@ public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {
102
143
103
144
if (!TextUtils .isEmpty (description )) {
104
145
holder .setItemTestResultDescription (description );
105
- holder .setButtonShowDetailsClickListner (mContext , item .getCVEorID (), altNames , description , impact , externalLinks , patches , cvssV2Score , cveDate );
146
+ holder .setButtonShowDetailsClickListner (mContext ,
147
+ item .getCVEorID (),
148
+ altNames ,
149
+ description ,
150
+ impact ,
151
+ externalLinks ,
152
+ patches ,
153
+ cvssV2Score ,
154
+ cveDate );
106
155
} else {
107
156
holder .setItemTestResultDescription (mContext .getString (R .string .information_not_available ));
108
157
109
158
if (jobj != null ) {
110
- holder .setButtonShowDetailsClickListner (mContext , item .getCVEorID (), altNames , description , impact , externalLinks , patches , cvssV2Score , cveDate );
159
+ holder .setButtonShowDetailsClickListner (mContext ,
160
+ item .getCVEorID (),
161
+ altNames ,
162
+ description ,
163
+ impact ,
164
+ externalLinks ,
165
+ patches ,
166
+ cvssV2Score ,
167
+ cveDate );
111
168
} else {
112
169
holder .setButtonShowDetailsClickListner (mContext , item .getCVEorID ());
113
170
}
0 commit comments