[
https://issues.apache.org/jira/browse/DRILL-4491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15186425#comment-15186425
]
Aditya Kishore edited comment on DRILL-4491 at 3/9/16 3:30 AM:
---------------------------------------------------------------
Until I looked at the code, I was under assumption that we are using Jackson to
extract the serializable properties. We can definitely go that route.
The way code currently works is that it iterate through allthe table options
and see if there is a Java field present in the corresponding
FormatPluginConfig class. If it does find one, and this is why I say it is a
bug in the current implementation, it makes is accessible
({{setAccesible(true)}}) implying that it is expected to work with non-public
fields and sets the value to the one passed as parameter.
was (Author: adityakishore):
Until I looked at the code, I was under assumption that we are using Jackson to
extract the serializable properties. We can definitely go that route.
The way code currently work is that it iterate
> FormatPluginOptionsDescriptor requires FormatPluginConfig fields to be public
> -----------------------------------------------------------------------------
>
> Key: DRILL-4491
> URL: https://issues.apache.org/jira/browse/DRILL-4491
> Project: Apache Drill
> Issue Type: Bug
> Reporter: Aditya Kishore
> Assignee: Aditya Kishore
> Priority: Minor
> Fix For: 1.7.0
>
>
> The code uses {{getField()}} instead of {{getDeclaredField()}}, which returns
> only the public fields.
> {code:title=FormatPluginOptionsDescriptor.java:165|borderStyle=solid}
> Field field = pluginConfigClass.getField(paramDef.name);
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)