[ 
https://issues.apache.org/jira/browse/PIG-2053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thejas M Nair updated PIG-2053:
-------------------------------

    Resolution: Fixed
      Assignee: Woody Anderson
        Status: Resolved  (was: Patch Available)

> PigInputFormat uses class.isAssignableFrom() where instanceof is more 
> appropriate
> ---------------------------------------------------------------------------------
>
>                 Key: PIG-2053
>                 URL: https://issues.apache.org/jira/browse/PIG-2053
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: 0.10
>            Reporter: Woody Anderson
>            Assignee: Woody Anderson
>            Priority: Minor
>              Labels: newbie
>             Fix For: 0.10
>
>         Attachments: 2053.patch
>
>
> This is a code style/quality improvement.
> isAssignableFrom is appropriate when the class is not known at compile type, 
> but assignment needs to be checked.
> e.g. foo.getClass().isAssignableFrom(bar.getClass())
> but, if the class of foo is known (e.g. X.class), then instanceof is more 
> appropriate and readable.
> i also made use of de morgan's to simply the "is combininable" boolean 
> statement, which is hard to grok as written.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to