vaadin / vaadin/framework

JavaScript NULL Pointer Exception if function not exist

Open
#12,245 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Stale
Dominant language
Java
Stars
1.8k
Forks
717
Avg merge
2d 6h
Merged PRs (30d)
3

Description

https://github.com/vaadin/framework/blob/754ca011d79af3dd4fa9046ff0ade5367f5e6246/server/src/main/java/com/vaadin/ui/JavaScript.java#L58

It seems that JavaScriptFunction can be null. if you you try make a function call on a non existing function the application will throw an exception. since there is no way to check with the API if a JavaScriptFunction exist it would be nice that this case would be handled in the API code.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at server/src/main/java/com/vaadin/ui/JavaScript.java around line 58 and trace how a missing JavaScriptFunction is handled when a function call is made. Confirm the intended API behavior for a nonexistent function; done means this case no longer throws a null-pointer exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, javascript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.