[
https://issues.apache.org/jira/browse/SOLR-14696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17168351#comment-17168351
]
Noble Paul commented on SOLR-14696:
-----------------------------------
The appropriate fix is to make make the internal field
{{PluginInfo#attributes}} into a {{Map<String,Object>}}.
The history is as follows. originally {{PluginInfo}} was read from XML. So, all
attributes are strings. Then we moved to JSON, Users are likely to give a
number as a number instead of a string. Then we have to go through every value
and convert it to string and back.
bq.BTW PluginInfo.toMap seems poor because it combined attributes and initArgs
as if it was one map which isn't a correct model of the true structure.
The model is bad because of trying to marry the XML configuration to JSON. I
wish we had to deal with only JSON.
> PluginInfo attribute values should only be Strings
> --------------------------------------------------
>
> Key: SOLR-14696
> URL: https://issues.apache.org/jira/browse/SOLR-14696
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: David Smiley
> Priority: Minor
>
> PluginInfo has a constructor that initializes its attributes field
> (Map<String,String>) to that of a constructor param (Map<String,Object>).
> Sometimes, the values aren't Strings, yet the code suppresses warnings about
> this and just sets it any way. This is nasty!
> Perhaps it should only let through some built-in meta names like name, class,
> and enabled that are or can trivially be coerced to a String.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]