Add the HistoryReference into the SiteMap. This method will rely on reading message from the History table. Note that this method must only be called on the EventDispatchThread @param ref
(HistoryReference ref)
| 367 | * @param ref |
| 368 | */ |
| 369 | public synchronized SiteNode addPath(HistoryReference ref) { |
| 370 | if (Constant.isLowMemoryOptionSet()) { |
| 371 | throw new InvalidParameterException( |
| 372 | "SiteMap should not be accessed when the low memory option is set"); |
| 373 | } |
| 374 | |
| 375 | if (isReferenceCached(ref)) { |
| 376 | return hrefMap.get(ref.getHistoryId()); |
| 377 | } |
| 378 | |
| 379 | HttpMessage msg = null; |
| 380 | try { |
| 381 | msg = ref.getHttpMessage(); |
| 382 | } catch (Exception e) { |
| 383 | // ZAP: Added error |
| 384 | LOGGER.error(e.getMessage(), e); |
| 385 | return null; |
| 386 | } |
| 387 | |
| 388 | return addPath(ref, msg); |
| 389 | } |
| 390 | |
| 391 | /** |
| 392 | * Add the HistoryReference with the corresponding HttpMessage into the SiteMap. This method |