Skip to content

Commit

Permalink
Compose Metadata Analyzer: Use v2 URL refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Valentijn Scholten <valentijnscholten@gmail.com>
  • Loading branch information
valentijnscholten committed Dec 21, 2024
1 parent e5eba1f commit 2bd3f08
Show file tree
Hide file tree
Showing 12 changed files with 18,576 additions and 134 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
*/
package org.dependencytrack.tasks.repositories;

import alpine.common.logging.Logger;
import alpine.notification.Notification;
import alpine.notification.NotificationLevel;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;

import org.apache.commons.lang3.StringUtils;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
Expand All @@ -33,10 +35,9 @@
import org.dependencytrack.notification.NotificationScope;
import org.dependencytrack.util.HttpUtil;

import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import alpine.common.logging.Logger;
import alpine.notification.Notification;
import alpine.notification.NotificationLevel;

/**
* Base abstract class that all IMetaAnalyzer implementations should likely extend.
Expand Down Expand Up @@ -90,6 +91,7 @@ protected void handleUnexpectedHttpResponse(final Logger logger, String url, fin

protected void handleRequestException(final Logger logger, final Exception e) {
logger.error("Request failure", e);
e.printStackTrace();
Notification.dispatch(new Notification()
.scope(NotificationScope.SYSTEM)
.group(NotificationGroup.REPOSITORY)
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit 2bd3f08

Please sign in to comment.