Skip to content

Commit 573fc4e

Browse files
authored
[ZEPPELIN-6220] Remove unused constructor in DownloadRequest.class
### What is this PR for? This PR removes unused overloaded constructors in the DownloadRequest class located at: zeppelin/zeppelin-test/src/main/java/org/apache/zeppelin/test/DownloadRequest.java. Specifically, the constructor: ``` public DownloadRequest(URL url, int retries) ``` is not used anywhere within the Zeppelin codebase or its test suite. Removing these unused constructors simplifies the class and reduces maintenance complexity, without affecting any functional behavior. As this constructor was removed, other constructors that were only used by it have also been removed accordingly. ### What type of PR is it? Refactoring ### Todos * [x] - Verify internal and external usage * [x] - Remove unused constructors ### What is the Jira issue? * Open an issue on Jira. [ZEPPELIN-6220](https://issues.apache.org/jira/browse/ZEPPELIN-6220) ### How should this be tested? * Strongly recommended: add automated unit tests for any new or changed behavior * Outline any manual steps to test the PR here. ### Screenshots (if appropriate) ### Questions: * Does the license files need to update? - no * Is there breaking changes for older versions? - no * Does this needs documentation? - no Closes #4970 from eunhwa99/ZEPPELIN-6220. Signed-off-by: Philipp Dallig <philipp.dallig@gmail.com>
1 parent 91f091e commit 573fc4e

1 file changed

Lines changed: 2 additions & 26 deletions

File tree

zeppelin-test/src/main/java/org/apache/zeppelin/test/DownloadRequest.java

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,42 +17,17 @@
1717

1818
package org.apache.zeppelin.test;
1919

20-
import java.net.MalformedURLException;
2120
import java.net.URL;
2221
import java.util.Optional;
2322

2423
public class DownloadRequest {
24+
2525
private final URL url;
2626
private final Optional<URL> alternativeUrl;
2727
private final int retries;
2828

2929
public static final int DEFAULT_RETRIES = 3;
3030

31-
public DownloadRequest(String url, int retries) throws MalformedURLException {
32-
this(url, null, retries);
33-
}
34-
35-
public DownloadRequest(String url, String alternativeUrl) throws MalformedURLException {
36-
this(url, alternativeUrl, DEFAULT_RETRIES);
37-
}
38-
39-
public DownloadRequest(String url, String alternativeUrl, int retries)
40-
throws MalformedURLException {
41-
if (alternativeUrl != null) {
42-
this.url = new URL(url);
43-
this.alternativeUrl = Optional.of(new URL(alternativeUrl));
44-
this.retries = retries;
45-
} else {
46-
this.url = new URL(url);
47-
this.alternativeUrl = Optional.empty();
48-
this.retries = retries;
49-
}
50-
}
51-
52-
public DownloadRequest(URL url, int retries) {
53-
this(url, null, retries);
54-
}
55-
5631
public DownloadRequest(URL url, URL alternativeUrl) {
5732
this(url, alternativeUrl, DEFAULT_RETRIES);
5833
}
@@ -75,3 +50,4 @@ public int getRetries() {
7550
return retries;
7651
}
7752
}
53+

0 commit comments

Comments
 (0)