This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 262343 - Preferences MAX_KEY_LENGHT no IllegalArgumentException is thrown no PreferenceChangeEvent is received
Summary: Preferences MAX_KEY_LENGHT no IllegalArgumentException is thrown no Preferen...
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Options&Settings (show other bugs)
Version: 8.2
Hardware: Other Other
: P3 normal (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-06 08:54 UTC by thomas_hopf
Modified: 2016-06-06 08:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description thomas_hopf 2016-06-06 08:54:23 UTC
I have a question regarding Preferences MAX_KEY_LENGHT:

In my NBPreferences I store a Boolean value using putBoolean() with a Key that is more than 80 characters long.

All works ok! Key and value is written in the config file! No IllegalArgumentException is thrown!

 

The only problem is that no PreferenceChangeEvent is fired! When I reduce the key length to less than 80 characters then the PreferenceChangeEvent is fired!

What is wrong? In the java API of Preferences it is written that IllegalArgumentException is fired - if key.length() exceeds MAX_KEY_LENGTH.

 

Is NBPreferences somehow suppressing the IllegalArgumentException?

What could be done to support firing PreferenceChangeEvent when keys have more than 80 characters?