This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-doap-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 57ea2e1  Remove the unused deprecated DoapUtil.fetchURL
57ea2e1 is described below

commit 57ea2e153f07f4b24db1f08b74aaf53deb3bcee3
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Sat Nov 14 10:50:53 2026 +0100

    Remove the unused deprecated DoapUtil.fetchURL
---
 .../java/org/apache/maven/plugin/doap/DoapUtil.java | 21 ---------------------
 .../org/apache/maven/plugin/doap/DoapUtilTest.java  | 11 -----------
 2 files changed, 32 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugin/doap/DoapUtil.java 
b/src/main/java/org/apache/maven/plugin/doap/DoapUtil.java
index 10f5a90..231284f 100644
--- a/src/main/java/org/apache/maven/plugin/doap/DoapUtil.java
+++ b/src/main/java/org/apache/maven/plugin/doap/DoapUtil.java
@@ -442,27 +442,6 @@ public class DoapUtil {
         return matcher.matches();
     }
 
-    /**
-     * Pings a URL.
-     *
-     * @param settings ignored
-     * @param url the URL to fetch
-     * @throws NullPointerException if url is null
-     * @throws IOException if any
-     * @since 1.1
-     * @deprecated Use java.net.URL or a different library to load the URL.
-     */
-    @Deprecated
-    public static void fetchURL(Settings settings, URL url) throws IOException 
{
-        if (url == null) {
-            throw new NullPointerException("url");
-        }
-
-        try (InputStream in = url.openStream()) {
-            return;
-        }
-    }
-
     /**
      * Interpolate a string with project and settings.
      *
diff --git a/src/test/java/org/apache/maven/plugin/doap/DoapUtilTest.java 
b/src/test/java/org/apache/maven/plugin/doap/DoapUtilTest.java
index e26fa48..ef9257d 100644
--- a/src/test/java/org/apache/maven/plugin/doap/DoapUtilTest.java
+++ b/src/test/java/org/apache/maven/plugin/doap/DoapUtilTest.java
@@ -41,7 +41,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.junit.jupiter.api.Assertions.fail;
 
@@ -202,16 +201,6 @@ class DoapUtilTest {
         assertFalse(DoapUtil.validate(doapFile).isEmpty());
     }
 
-    /**
-     * Test method for:
-     * {@link DoapUtil#fetchURL(org.apache.maven.settings.Settings, 
java.net.URL)}
-     *
-     */
-    @Test
-    void testFetchURLWithNullURL() {
-        assertThrows(NullPointerException.class, () -> DoapUtil.fetchURL(null, 
null));
-    }
-
     /**
      * Test method for:
      * {@link DoapUtil#interpolate(String, MavenProject, 
org.apache.maven.settings.Settings)}

Reply via email to