[ https://issues.apache.org/jira/browse/SOLR-9161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15305993#comment-15305993 ]
Uwe Schindler commented on SOLR-9161: ------------------------------------- Happens for me, too, on every JVM version. FYI, I implemented something similar for the extraction module or also for the SystemInfoHandler: [https://github.com/apache/lucene-solr/blob/5e5fd662575105de88d8514b426bccdcb4c76948/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java#L214-L232] It uses the java.beans.Introspector class to introspect beans and read/set properties. This should be preferred, if you need to guess method names (setProperty, getProperty and isProperty for booleans). I think the same should be done for the plugin utils, if they use bean properties. > SolrPluginUtils.invokeSetters should accommodate setter variants > ---------------------------------------------------------------- > > Key: SOLR-9161 > URL: https://issues.apache.org/jira/browse/SOLR-9161 > Project: Solr > Issue Type: Bug > Reporter: Christine Poerschke > Assignee: Christine Poerschke > Priority: Minor > Attachments: SOLR-9161.patch > > > The code currently assumes that there is only one setter (or if there are > several setters then the first one found is used and it could mismatch on the > arg type). > Context and motivation is that a class with a > {code} > void setAFloat(float val) { > this.val = val; > } > {code} > setter may wish to also provide a > {code} > void setAFloat(String val) { > this.val = Float.parseFloat(val); > } > {code} > convenience setter. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org