Skip to content

Commit

Permalink
Enforce line lengths of 120/fix long lines (#560)
Browse files Browse the repository at this point in the history
* enforce line lengths of 120

* fix long lines
  • Loading branch information
bbaldino authored Jun 30, 2020
1 parent c3e710f commit 902880b
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 7 deletions.
12 changes: 12 additions & 0 deletions checkstyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">

<module name="Checker">
<module name="LineLength">
<property name="fileExtensions" value="java"/>
<property name="max" value="120"/>
<property name="ignorePattern" value="http://|https://"/>
</module>
</module>
15 changes: 15 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,21 @@
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<configLocation>checkstyle.xml</configLocation>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
12 changes: 8 additions & 4 deletions src/main/java/org/jitsi/jicofo/JitsiMeetConferenceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -2056,8 +2056,10 @@ private XMPPError removeSources(JingleSession sourceJingleSession,
* @param contents - The list of Jingle 'content' packet extensions which
* describe media sources and groups.
*
* @return See returns description of {@link SSRCValidator#tryAddSourcesAndGroups(MediaSourceMap, MediaSourceGroupMap)}.
* @throws InvalidSSRCsException See throws description of {@link SSRCValidator#tryAddSourcesAndGroups(MediaSourceMap, MediaSourceGroupMap)}.
* @return See returns description of
* {@link SSRCValidator#tryAddSourcesAndGroups(MediaSourceMap, MediaSourceGroupMap)}.
* @throws InvalidSSRCsException See throws description of
* {@link SSRCValidator#tryAddSourcesAndGroups(MediaSourceMap, MediaSourceGroupMap)}.
*/
private Object[] tryAddSourcesToParticipant(
Participant participant,
Expand All @@ -2078,8 +2080,10 @@ private Object[] tryAddSourcesToParticipant(
* @param newSources - The new media sources to add.
* @param newGroups - The new media group sources to add.
*
* @return See returns description of {@link SSRCValidator#tryAddSourcesAndGroups(MediaSourceMap, MediaSourceGroupMap)}.
* @throws InvalidSSRCsException See throws description of {@link SSRCValidator#tryAddSourcesAndGroups(MediaSourceMap, MediaSourceGroupMap)}.
* @return See returns description of
* {@link SSRCValidator#tryAddSourcesAndGroups(MediaSourceMap, MediaSourceGroupMap)}.
* @throws InvalidSSRCsException See throws description of
* {@link SSRCValidator#tryAddSourcesAndGroups(MediaSourceMap, MediaSourceGroupMap)}.
*/
private Object[] tryAddSourcesToParticipant(
Participant participant,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ public Bridge doSelect(

return notLoadedAlreadyInConferenceInRegion(bridges, conferenceBridges, conferenceRegion).orElseGet(
() -> notLoadedInRegion(bridges, conferenceBridges, conferenceRegion).orElseGet(
() -> leastLoadedAlreadyInConferenceInRegion(bridges, conferenceBridges, conferenceRegion).orElse(null)));
() -> leastLoadedAlreadyInConferenceInRegion(
bridges,
conferenceBridges,
conferenceRegion).orElse(null)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public Bridge doSelect(
{
// If there's any bridge not yet in this conference, use that; otherwise
// find the bridge with the fewest participants
Optional<Bridge> bridgeNotYetInConf = bridges.stream().filter(b -> !conferenceBridges.containsKey(b)).findFirst();
Optional<Bridge> bridgeNotYetInConf = bridges.stream()
.filter(b -> !conferenceBridges.containsKey(b)).findFirst();
return bridgeNotYetInConf.orElseGet(() -> conferenceBridges.entrySet().stream()
.min(Map.Entry.comparingByValue())
.map(Map.Entry::getKey)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ public int computeSenderIngressPacketRatePps()

public int computeParticipantEgressPacketRatePps()
{
return (numberOfSpeakers * maxPacketRatePps[0] + (numberOfGlobalSenders - 2) * maxPacketRatePps[1] + maxPacketRatePps[3]);
return (numberOfSpeakers * maxPacketRatePps[0] +
(numberOfGlobalSenders - 2) * maxPacketRatePps[1] + maxPacketRatePps[3]);
}

public int computeIngressPacketRatePps()
Expand Down

0 comments on commit 902880b

Please sign in to comment.