Skip to content

Commit a129c65

Browse files
TobiGrStypox
andauthored
more improvements of comments
Co-Authored-By: Stypox <stypox@pm.me>
1 parent 0a41152 commit a129c65

6 files changed

Lines changed: 7 additions & 7 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/StreamingService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ public StreamExtractor getStreamExtractor(String url) throws ExtractionException
263263

264264
public CommentsExtractor getCommentsExtractor(String url) throws ExtractionException {
265265
ListLinkHandlerFactory llhf = getCommentsLHFactory();
266-
if (null == llhf) {
266+
if (llhf == null) {
267267
return null;
268268
}
269269
return getCommentsExtractor(llhf.fromUrl(url));

extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/PeertubeInstance.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public void fetchInstanceMetaData() throws Exception {
4343
throw new Exception("unable to configure instance " + url, e);
4444
}
4545

46-
if (null == response || StringUtil.isBlank(response.responseBody())) {
46+
if (response == null || StringUtil.isBlank(response.responseBody())) {
4747
throw new Exception("unable to configure instance " + url);
4848
}
4949

extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeChannelExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ private void setInitialData(String responseBody) throws ExtractionException {
171171
} catch (JsonParserException e) {
172172
throw new ExtractionException("Unable to extract peertube channel data", e);
173173
}
174-
if (null == json) throw new ExtractionException("Unable to extract PeerTube channel data");
174+
if (json == null) throw new ExtractionException("Unable to extract PeerTube channel data");
175175
}
176176

177177
@Override

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeCommentsExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ private void collectCommentsFrom(CommentsInfoItemsCollector collector, JsonObjec
133133
}
134134

135135
private void fetchTitle(JsonArray contents) {
136-
if (null == title) {
136+
if (title == null) {
137137
try {
138138
title = getYoutubeText(JsonUtils.getObject(contents.getObject(0), "commentThreadRenderer.commentTargetTitle"));
139139
} catch (Exception e) {

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubePlaylistExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public String getThumbnailUrl() throws ParsingException {
6868
@Override
6969
public String getBannerUrl() {
7070
return ""; // Banner can't be handled by frontend right now.
71-
// Whoever is willing to implement this should also implement this in the front end.
71+
// Whoever is willing to implement this should also implement it in the frontend.
7272
}
7373

7474
@Override

extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamExtractor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,10 @@ protected long getTimestampSeconds(String regexPattern) throws ParsingException
335335
try {
336336
timeStamp = Parser.matchGroup1(regexPattern, getOriginalUrl());
337337
} catch (Parser.RegexException e) {
338-
// catch this instantly since an url does not necessarily have to have a time stamp
338+
// catch this instantly since a url does not necessarily have a timestamp
339339

340340
// -2 because the testing system will consequently know that the regex failed
341-
// not good i know
341+
// not good, I know
342342
return -2;
343343
}
344344

0 commit comments

Comments
 (0)