1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-23 20:42:06 +01:00

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

View file

@ -489,6 +489,13 @@ public class JingleSession {
return contents.get(name); 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() { public JingleContent getSoleContentOrThrow() {
if (contents.isEmpty()) { if (contents.isEmpty()) {
return null; return null;