Skip to content

Commit

Permalink
Update SearchResultEntry.java
Browse files Browse the repository at this point in the history
  • Loading branch information
bit4woo committed Apr 15, 2024
1 parent 8b75fe5 commit 751c1f1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/InternetSearch/SearchResultEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ public void setHost(String host) {
if (StringUtils.isEmpty(this.host)) {
this.host = host;
}

if (StringUtils.isEmpty(rootDomain)) {
if(DomainNameUtils.isValidDomain(host)) {
rootDomain = DomainNameUtils.getRootDomain(host);
}
}
}

public String getProtocol() {
Expand Down

0 comments on commit 751c1f1

Please sign in to comment.