Permalink
Browse files

Fix NPE in reservation system when there's no authAuthority (#159)

Fix NPE in reservation system when there's no authAuthority
  • Loading branch information...
debugmaster authored and paweldomas committed Jan 25, 2017
1 parent 2d8513d commit 8ca85a3daa70509038eafea48aa8c1bf5c019590
Showing with 10 additions and 3 deletions.
  1. +10 −3 src/main/java/org/jitsi/impl/reservation/rest/RESTReservations.java
@@ -149,11 +149,11 @@ else if (result.statusCode == 409
// Conference already exists(check if we have it locally)
conference = findConferenceForId(conflictId);
logger.info(
"Conference '" + mucRoomName + "' already "
+ "allocated, id: " + conflictId);
// do GET conflict conference
if (conference == null)
{
@@ -197,6 +197,14 @@ else if (result.statusCode == 409
}
}
// If there is no authAuthority, creator is null
if (creator == null)
{
logger.warn(
"Room " + mucRoomName + " was created without a creator");
return new Result(RESULT_OK);
}
// Verify owner == creator
if (creator.equals(conference.getOwner()))
{
@@ -207,7 +215,6 @@ else if (result.statusCode == 409
logger.error(
"Room " + mucRoomName + ", conflict : "
+ creator + " != " + conference.getOwner());
return new Result(RESULT_CONFLICT);
}
}

0 comments on commit 8ca85a3

Please sign in to comment.