Skip to content

Commit

Permalink
Drop IOException from Endpoint constructor signature. (#1253)
Browse files Browse the repository at this point in the history
  • Loading branch information
mstyura authored May 8, 2020
1 parent 357ee2c commit 5f9377b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 27 deletions.
1 change: 0 additions & 1 deletion src/main/java/org/jitsi/videobridge/Conference.java
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,6 @@ public AbstractEndpoint getEndpoint(@NotNull String id)
*/
@NotNull
public Endpoint createLocalEndpoint(String id, boolean iceControlling)
throws IOException
{
final AbstractEndpoint existingEndpoint = getEndpoint(id);
if (existingEndpoint instanceof OctoEndpoint)
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/org/jitsi/videobridge/Endpoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ public Endpoint(
Logger parentLogger,
boolean iceControlling,
Clock clock)
throws IOException
{
super(conference, id, parentLogger);

Expand Down Expand Up @@ -353,7 +352,6 @@ public Endpoint(
Conference conference,
Logger parentLogger,
boolean iceControlling)
throws IOException
{
this(id, conference, parentLogger, iceControlling, Clock.systemUTC());
}
Expand Down
14 changes: 3 additions & 11 deletions src/main/java/org/jitsi/videobridge/health/Health.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,9 @@ private static void check(Conference conference)

for (int i = 0; i < numEndpoints; ++i)
{
final Endpoint endpoint;
try
{
final boolean iceControlling = i % 2 == 0;
endpoint = conference.createLocalEndpoint(
generateEndpointID(), iceControlling);
}
catch (IOException ioe)
{
throw new RuntimeException(ioe);
}
final boolean iceControlling = i % 2 == 0;
final Endpoint endpoint = conference.createLocalEndpoint(
generateEndpointID(), iceControlling);

//endpoints.add(endpoint);

Expand Down
15 changes: 2 additions & 13 deletions src/main/java/org/jitsi/videobridge/shim/ConferenceShim.java
Original file line number Diff line number Diff line change
Expand Up @@ -314,26 +314,15 @@ void initializeSignaledEndpoints(ColibriConferenceIQ conferenceIQ)
* @param endpointId identifier of endpoint to check and initialize
* @param iceControlling ICE control role of transport of newly created
* endpoint
* @throws VideobridgeShim.IqProcessingException
*/
private void ensureEndpointCreated(String endpointId, boolean iceControlling)
throws VideobridgeShim.IqProcessingException
{
if (conference.getLocalEndpoint(endpointId) != null)
{
return;
}
try
{
conference.createLocalEndpoint(endpointId, iceControlling);
}
catch (IOException ioe)
{
throw new VideobridgeShim.IqProcessingException(
XMPPError.Condition.internal_server_error,
"Error initializing endpoint " +
endpointId);
}

conference.createLocalEndpoint(endpointId, iceControlling);
}

/**
Expand Down

0 comments on commit 5f9377b

Please sign in to comment.