Closed mbien closed 9 months ago
What happens in the problematic cases? This sounds like the problem lies deeper and should be fixed at the root.
you are right. I couldn't find it yesterday, but I did find it today. Enabling all tests since this would be in the project api itself.
btw invalid keys will produce a warning:
WARNING [org.netbeans.modules.maven.MavenProjectPropsImpl]: #200901: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. from org-netbeans-spi-editor-hints-projects.text.x-java.org_2e_netbeans_2e_modules_2e_java_2e_hints_2e_bugs_2e_Unbalanced$Collection.enabled
Settings persistence does not like keys with
$
signs in them. Two hints (bugs.Unbalanced$Array
and$Collection
) were implemented via annotated inner classes and can't be disabled by the user since the FQN is used as key/id by default.~Easiest fix seems to be to change the default id generation a bit and replace '$' with '_'. I am sure this could be also implemented somewhere later in the logic but I couldn't find the reason why the preference entry is quietly ignored, so I went for the easy option.~
However a better option might be to encode the
$
inAuxiliaryConfigBasedPreferencesProvider
which is already encoding other chars.how to replicate:
project settings -> hints -> use project specific options
nb-configuration.xml