Skip to content

Arduino 1.5.x IDE Throws nullPointer Exceptions for Detectable Errors due to Preferences::get #1471

Closed
@thisdroneeatspeople

Description

@thisdroneeatspeople

All of the calls to prefs.get() will throw exceptions if the key does not exist. For example, if you leave out bootloader.tool, and attempt to burn a bootloader, you will get the following error:

java.lang.NullPointerException
at processing.app.debug.BasicUploader.burnBootloader(BasicUploader.java:276)

Suggestion: modify the get method of Preferences to return a default string instead of a null pointer when a key doesn't exist, or wrap all calls to get() with a try/catch such that the exception is correctly captured and a meaningful message can be returned to the user.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions