Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6B7E7200C3D for ; Tue, 14 Mar 2017 14:35:52 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6A191160B7E; Tue, 14 Mar 2017 13:35:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B353A160B7C for ; Tue, 14 Mar 2017 14:35:51 +0100 (CET) Received: (qmail 48337 invoked by uid 500); 14 Mar 2017 13:35:49 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 48322 invoked by uid 99); 14 Mar 2017 13:35:49 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Mar 2017 13:35:49 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id EBA0E185856 for ; Tue, 14 Mar 2017 13:35:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.652 X-Spam-Level: X-Spam-Status: No, score=0.652 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id RAq2YJBV7HCz for ; Tue, 14 Mar 2017 13:35:48 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 0DB5761C63 for ; Tue, 14 Mar 2017 13:35:48 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 85F96E026E for ; Tue, 14 Mar 2017 13:35:47 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id CA6AB243C0 for ; Tue, 14 Mar 2017 13:35:41 +0000 (UTC) Date: Tue, 14 Mar 2017 13:35:41 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LANG-1310) MethodUtils.invokeMethod throws ArrayStoreException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 14 Mar 2017 13:35:52 -0000 [ https://issues.apache.org/jira/browse/LANG-1310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15924195#comment-15924195 ] ASF GitHub Bot commented on LANG-1310: -------------------------------------- Github user coveralls commented on the issue: https://github.com/apache/commons-lang/pull/256 [![Coverage Status](https://coveralls.io/builds/10583606/badge)](https://coveralls.io/builds/10583606) Coverage increased (+0.06%) to 94.588% when pulling **6daa417fe9826d0bfa9c2366fc520a1519e8579f on drajakumar:master** into **39a2a6fa38c5e4d1293e00f98a89698a962d6775 on apache:master**. > MethodUtils.invokeMethod throws ArrayStoreException > --------------------------------------------------- > > Key: LANG-1310 > URL: https://issues.apache.org/jira/browse/LANG-1310 > Project: Commons Lang > Issue Type: Bug > Components: lang.reflect.* > Affects Versions: 3.5 > Reporter: Eickvonder > > Since release 3.5 and due to the changes of LANG-1115 an ArrayStoreException occurs on MethodUtils.invokeMethod if using varargs arguments and smaller types than the method defines (e.g. int vs long). > {code} > @Test > public void testMethodUtilsInvokeMethodVarArgs () throws Exception { > MyObject object = new MyObject (); > MethodUtils.invokeMethod (object, "doSomething", 1); > } > public static class MyObject { > public void doSomething (long... args) { > System.out.println ("doSomething"); > } > } > {code} > throws > {code} > java.lang.ArrayStoreException > at java.lang.System.arraycopy(Native Method) > at org.apache.commons.lang3.reflect.MethodUtils.getVarArgs(MethodUtils.java:497) > at org.apache.commons.lang3.reflect.MethodUtils.toVarArgs(MethodUtils.java:463) > at org.apache.commons.lang3.reflect.MethodUtils.invokeMethod(MethodUtils.java:234) > at org.apache.commons.lang3.reflect.MethodUtils.invokeMethod(MethodUtils.java:270) > at org.apache.commons.lang3.reflect.MethodUtils.invokeMethod(MethodUtils.java:147) > {code} > In 3.4. a NoSuchMethodException had been thrown, but in 3.5 the code now finds the matching method but fails then with above exception. -- This message was sent by Atlassian JIRA (v6.3.15#6346)