Merge master

This commit is contained in:
vanitasvitae 2017-08-05 17:22:13 +02:00
commit 62587daa35
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
1 changed files with 7 additions and 0 deletions

View File

@ -489,6 +489,13 @@ public class JingleSession {
return contents.get(name);
}
/**
* Get the only jingle content if one exists, or <code>null</code>. This method will throw an
* {@link IllegalStateException} if there is more than one jingle content.
*
* @return a JingleContent instance or <code>null</code>.
* @throws IllegalStateException if there is more than one jingle content.
*/
public JingleContent getSoleContentOrThrow() {
if (contents.isEmpty()) {
return null;