|
45 | 45 | import javax.swing.ImageIcon;
|
46 | 46 | import net.sf.json.JSONArray;
|
47 | 47 | import net.sf.json.JSONObject;
|
| 48 | +import org.apache.commons.lang3.time.DurationFormatUtils; |
48 | 49 | import org.apache.logging.log4j.LogManager;
|
49 | 50 | import org.apache.logging.log4j.Logger;
|
50 | 51 | import org.jsoup.select.QueryParser;
|
@@ -103,11 +104,12 @@ TechData parse(String categories, List<String> technologies, boolean createIcons
|
103 | 104 | // Note: Based on testing having the forEach separate performs faster than chaining it
|
104 | 105 | futures.forEach(CompletableFuture::join);
|
105 | 106 | executor.shutdown();
|
106 |
| - Instant finish = Instant.now(); |
| 107 | + long loadTime = Duration.between(start, Instant.now()).toMillis(); |
107 | 108 | LOGGER.info(
|
108 |
| - "Loaded {} Tech Detection technologies, in {}ms", |
| 109 | + "Loaded {} Tech Detection technologies, in {} ({}ms)", |
109 | 110 | techData.getApplications().size(),
|
110 |
| - Duration.between(start, finish).toMillis()); |
| 111 | + DurationFormatUtils.formatDurationWords(loadTime, true, true), |
| 112 | + loadTime); |
111 | 113 | return techData;
|
112 | 114 | }
|
113 | 115 |
|
@@ -404,6 +406,9 @@ private List<Map<String, Map<String, Map<String, AppPattern>>>> jsonToAppPattern
|
404 | 406 | }
|
405 | 407 | }
|
406 | 408 | }
|
| 409 | + } else if (json instanceof JSONArray) { |
| 410 | + // DOM Pattern JSONArrays are ignored here |
| 411 | + // They will be added as Simple DOM Patterns |
407 | 412 | } else {
|
408 | 413 | LOGGER.debug(
|
409 | 414 | "Unexpected JSON type for {} pattern: {} {}",
|
|
0 commit comments