[jira] [Updated] (PIG-2053) PigInputFormat uses class.isAssignableFrom() where instanceof is more appropriate

2011-07-18 Thread Thejas M Nair (JIRA)

 [ 
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




[jira] [Updated] (PIG-2053) PigInputFormat uses class.isAssignableFrom() where instanceof is more appropriate

2011-07-15 Thread Alan Gates (JIRA)

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

Alan Gates updated PIG-2053:


Status: Patch Available  (was: Open)

Submitting patch so this can get reviewed and committed.

 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
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




[jira] [Updated] (PIG-2053) PigInputFormat uses class.isAssignableFrom() where instanceof is more appropriate

2011-05-09 Thread Woody Anderson (JIRA)

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

Woody Anderson updated PIG-2053:


Attachment: 2053.patch

patch

 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
Priority: Minor
 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