Skip to content

Commit

Permalink
refactor[OrgApiWrapper]: put off parameter validation to ParameterVal…
Browse files Browse the repository at this point in the history
…idator
  • Loading branch information
Lucy Ciara Herud-Thomassen authored and Lucy Ciara Herud-Thomassen committed Apr 9, 2026
1 parent ab64cda commit 2f72f75
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main/java/edu/group5/app/model/wrapper/OrgApiWrapper.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package edu.group5.app.model.wrapper;

import edu.group5.app.utils.ParameterValidator;
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
Expand All @@ -24,11 +25,7 @@ public class OrgApiWrapper extends Wrapper {
* @param urlString A string of the URL that's being connected to.
*/
public OrgApiWrapper(String urlString) {
if (urlString == null) {
throw new IllegalArgumentException("url can't be null");
} else if (urlString.isBlank()) {
throw new IllegalArgumentException("url can't be blank");
}
ParameterValidator.stringChecker(urlString, "url");
try {
URI uri = URI.create(urlString);
this.client = HttpClient.newHttpClient();
Expand Down

0 comments on commit 2f72f75

Please sign in to comment.