Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to instantiate any APL command classes #2

Closed
rayarub opened this issue Jul 1, 2019 · 1 comment
Closed

Unable to instantiate any APL command classes #2

rayarub opened this issue Jul 1, 2019 · 1 comment

Comments

@rayarub
Copy link

rayarub commented Jul 1, 2019

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report  
[ ] Performance issue
[ ] Feature request (generic to all classes)
[ ] Documentation issue or request
[ ] Other... Please describe:

Attempting to instantiate any subclass of com.amazon.ask.model.interfaces.alexa.presentation.apl.Command fails with a NullPointerException.

Expected Behavior

I should be able to instantiate a command class correctly, For example, the following code should complete successfully:
IdleCommand command = IdleCommand.builder().withDelay(42).build();

Current Behavior

The above code throws a NullPointerException.

Possible Solution

The issue appears to be from commit bddf618, which introduced String.valueOf(null) as the default value for the delay field. String.valueOf(null) is not correct code as it will always throw a NullPointerException. This default value should be removed.

Steps to Reproduce (for bugs)

// Provide a self-contained, concise snippet of code using the SDK.
// For more complex issues provide a repo with the smallest sample that reproduces the bug
// Including business logic or unrelated code makes diagnosis more difficult

See above example.

Context

This bug is fairly critical as it prevents the use of any APL commands via alexa/alexa-skills-kit-sdk-for-java version 2.20.0 or later, which relies on this library.

Your Environment

  • ASK SDK Models for Java used: 1.18.0
  • ASK SDK for Java used: 2.20.0
  • Operating System and version: macOS 10.14.5 / OpenJDK 11.0.2
@breedloj
Copy link
Contributor

breedloj commented Jul 2, 2019

Thanks for reporting this. We've issued SDK version 2.20.1 to fix this bug. Please feel free to re-open if you continue to experience issues.

@breedloj breedloj closed this as completed Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants