Skip to content

Commit a76281b

Browse files
Fixed Javadoc in callback helper, add additional checks for emptiness in internal/utility helper
1 parent 13ab161 commit a76281b

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

src/main/java/engineer/nightowl/sonos/api/util/SonosCallbackHelper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ public class SonosCallbackHelper
2323
/**
2424
* Verify that the message was signed by Sonos.
2525
*
26-
* @param headers from the message
26+
* @param headers from the message
27+
* @param apiKey of your integration
28+
* @param apiSecret of your integration
2729
* @return true if the message is cryptographically provable to be from Sonos
2830
* @throws SonosApiClientException if in an unsupported environment
2931
*/

src/main/java/engineer/nightowl/sonos/api/util/SonosUtilityHelper.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,25 @@ public static boolean isEmpty(final Map<?, ?> map)
3838
}
3939

4040
/**
41-
* This method returns true if the objet is null.
41+
* This method returns true if the object is null.
4242
*
4343
* @param object to check if null
4444
* @return true | false
4545
*/
4646
public static boolean isEmpty(final Object object)
4747
{
48+
if (object instanceof Map)
49+
{
50+
return isEmpty((Map) object);
51+
}
52+
if (object instanceof String)
53+
{
54+
return isEmpty((String) object);
55+
}
56+
if (object instanceof Collection)
57+
{
58+
return isEmpty((Collection) object);
59+
}
4860
if (object == null)
4961
{
5062
return true;

0 commit comments

Comments
 (0)