alexa / alexa-skills-kit-sdk-for-java

The Alexa Skills Kit SDK for Java helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
http://developer.amazon.com/ask
Apache License 2.0
815 stars 746 forks source link

Fix NPE in viewport profile mapper for non APL requests #283

Closed breedloj closed 3 years ago

breedloj commented 3 years ago

Description

Previously, if a viewport was not contained in a request (for example, a non APL enabled request) the getViewportProfile() method would return an NPE. This is undesirable behavior, and has been updated to return a ViewportProfile.UNKNOWN_VIEWPORT_PROFILE in these cases.

Motivation and Context

User reported getting exceptions in a common flow that calls this method.

Testing

New and existing tests pass.

Screenshots (if appropriate)

Types of changes

Checklist

License