[ https://issues.apache.org/jira/browse/HBASE-4738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Phabricator updated HBASE-4738: ------------------------------- Attachment: D231.1.patch cgist requested code review of "HBASE-4738 [jira] [89-fb] HBaseAdmin has ambiguous varargs invocations". Reviewers: Karthik, JIRA Fixed HBaseAdmin ambiguous varargs invocations HBaseAdmin had ambiguous uses of varargs parameters which relied on the compiler to implicitly cast arguments to Object[] for correct operation. Certain java compilers (1.6.0_26 on OSX) were found to instead wrap the argument inside a new Object[], breaking HBaseAdmin and the HBase shell. This change avoids the ambiguous invocations by explicitly casting the arguments to Object[]. Ambiguous invocations of varargs methods with non-varargs arguments relied on the compiler to implicitly cast the arguments to Object[]. Some compilers apparently do not make this implicit cast, but instead wrap the arguments in another Object[] causing them to be interpreted incorrectly. TEST PLAN compiled HBaseAdmin with JDK 1.6.0_24 and 1.6.0_26 and tested the HBase shell with commands which take a variable number of arguments. REVISION DETAIL https://reviews.facebook.net/D231 AFFECTED FILES src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java MANAGE HERALD DIFFERENTIAL RULES https://reviews.facebook.net/herald/view/differential/ WHY DID I GET THIS EMAIL? https://reviews.facebook.net/herald/transcript/441/ Tip: use the X-Herald-Rules header to filter Herald messages in your client. > [89-fb] HBaseAdmin has ambiguous varargs invocations > ---------------------------------------------------- > > Key: HBASE-4738 > URL: https://issues.apache.org/jira/browse/HBASE-4738 > Project: HBase > Issue Type: Bug > Components: client > Environment: JDK 1.6.0_26 on OSX > Reporter: Christopher Gist > Priority: Minor > Attachments: D231.1.patch > > > Ambiguous invocations of varargs methods with non-varargs arguments relied on > the compiler to implicitly cast the arguments to Object[]. Some compilers > apparently do not make this implicit cast, but instead wrap the arguments in > another Object[] causing them to be interpreted incorrectly. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira