[PeerTube] Use final when possible, ide refactorings

This commit is contained in:
Stypox 2020-04-11 17:17:47 +02:00
parent fcb9b6f855
commit 06430c4749
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
3 changed files with 5 additions and 7 deletions

View File

@ -27,8 +27,7 @@ public class PeertubeStreamInfoItemExtractor implements StreamInfoItemExtractor
@Override
public String getThumbnailUrl() throws ParsingException {
final String value = JsonUtils.getString(item, "thumbnailPath");
return baseUrl + value;
return baseUrl + JsonUtils.getString(item, "thumbnailPath");
}
@Override
@ -51,7 +50,8 @@ public class PeertubeStreamInfoItemExtractor implements StreamInfoItemExtractor
final String name = JsonUtils.getString(item, "account.name");
final String host = JsonUtils.getString(item, "account.host");
return ServiceList.PeerTube.getChannelLHFactory().fromId("accounts/" + name + "@" + host, baseUrl).getUrl();
return ServiceList.PeerTube.getChannelLHFactory()
.fromId("accounts/" + name + "@" + host, baseUrl).getUrl();
}
@Override

View File

@ -24,8 +24,7 @@ public class PeertubeChannelLinkHandlerFactory extends ListLinkHandlerFactory {
@Override
public String getUrl(String id, List<String> contentFilters, String searchFilter) throws ParsingException {
String baseUrl = ServiceList.PeerTube.getBaseUrl();
return getUrl(id, contentFilters, searchFilter, baseUrl);
return getUrl(id, contentFilters, searchFilter, ServiceList.PeerTube.getBaseUrl());
}
@Override

View File

@ -22,8 +22,7 @@ public class PeertubeStreamLinkHandlerFactory extends LinkHandlerFactory {
@Override
public String getUrl(String id) {
String baseUrl = ServiceList.PeerTube.getBaseUrl();
return getUrl(id, baseUrl);
return getUrl(id, ServiceList.PeerTube.getBaseUrl());
}
@Override