Closed rmueller83 closed 7 years ago
https://github.com/alexa/skill-samples-java/blob/1520b024a9eb0fd1a0c08506ac002309491a4ae9/address/src/com/amazon/asksdk/address/DeviceAddressSpeechlet.java#L129 fails with an NPE if the user has not given permission.
https://developer.amazon.com/docs/custom-skills/request-and-response-json-reference.html says "The accessToken field will not appear if null, and the permissions object also will not appear if consentToken is null.".
accessToken
permissions
consentToken
So the null check 2 lines below which checks the consentToken should be done on the permission object.
permission
Fixed in commit e01634712652e238ea7535fc85ff051eed819eac
https://github.com/alexa/skill-samples-java/blob/1520b024a9eb0fd1a0c08506ac002309491a4ae9/address/src/com/amazon/asksdk/address/DeviceAddressSpeechlet.java#L129 fails with an NPE if the user has not given permission.
https://developer.amazon.com/docs/custom-skills/request-and-response-json-reference.html says "The
accessToken
field will not appear if null, and thepermissions
object also will not appear ifconsentToken
is null.".So the null check 2 lines below which checks the
consentToken
should be done on thepermission
object.