Skip to content

Commit

Permalink
Removed unneeded this keyword for protected method.
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Laursen <[email protected]>
  • Loading branch information
jlaur committed Jan 9, 2022
1 parent 1e83f79 commit 225cd29
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ public AutomationChannelBuilder withScheduledEvents(List<ScheduledEvent> schedul
*/
public List<Channel> build() {
if (scheduledEvents == null || (scenes == null && sceneCollections == null)) {
return this.getChannelList(0);
return getChannelList(0);
}
List<ScheduledEvent> scheduledEvents = (@NonNull List<ScheduledEvent>) this.scheduledEvents;
List<Channel> channels = this.getChannelList(scheduledEvents.size());
List<Channel> channels = getChannelList(scheduledEvents.size());
scheduledEvents.stream().forEach(scheduledEvent -> {
Channel channel = createChannel(scheduledEvent);
if (channel != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ protected BaseChannelBuilder(HDPowerViewTranslationProvider translationProvider,
}

protected List<Channel> getChannelList(int initialCapacity) {
return this.channels != null ? (@NonNull List<Channel>) this.channels : new ArrayList<>(initialCapacity);
return channels != null ? (@NonNull List<Channel>) channels : new ArrayList<>(initialCapacity);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ public SceneChannelBuilder withScenes(List<Scene> scenes) {
*/
public List<Channel> build() {
if (scenes == null) {
return this.getChannelList(0);
return getChannelList(0);
}
List<Scene> scenes = (@NonNull List<Scene>) this.scenes;
List<Channel> channels = this.getChannelList(scenes.size());
List<Channel> channels = getChannelList(scenes.size());
scenes.stream().sorted().forEach(scene -> channels.add(createChannel(scene)));
return channels;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ public SceneGroupChannelBuilder withSceneCollections(List<SceneCollection> scene
*/
public List<Channel> build() {
if (sceneCollections == null) {
return this.getChannelList(0);
return getChannelList(0);
}
List<SceneCollection> sceneCollections = (@NonNull List<SceneCollection>) this.sceneCollections;
List<Channel> channels = this.getChannelList(sceneCollections.size());
List<Channel> channels = getChannelList(sceneCollections.size());
sceneCollections.stream().sorted().forEach(sceneCollection -> channels.add(createChannel(sceneCollection)));
return channels;
}
Expand Down

0 comments on commit 225cd29

Please sign in to comment.