Wrong use of toArray() method
----------------------------- Key: OFBIZ-4425 URL: https://issues.apache.org/jira/browse/OFBIZ-4425 Project: OFBiz Issue Type: Bug Components: framework Reporter: Dimitri Unruh Attachments: OFBIZ-4425.patch just a short example: {code} Collection<String> foo; .... String[] temp = (String[]) foo.toArray(); {code} So we will get (usually ) a ClassCastException, because toArray() return an Object[] -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira |
[ https://issues.apache.org/jira/browse/OFBIZ-4425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dimitri Unruh updated OFBIZ-4425: --------------------------------- Attachment: OFBIZ-4425.patch > Wrong use of toArray() method > ----------------------------- > > Key: OFBIZ-4425 > URL: https://issues.apache.org/jira/browse/OFBIZ-4425 > Project: OFBiz > Issue Type: Bug > Components: framework > Reporter: Dimitri Unruh > Attachments: OFBIZ-4425.patch > > > just a short example: > {code} > Collection<String> foo; > .... > String[] temp = (String[]) foo.toArray(); > {code} > So we will get (usually ) a ClassCastException, because toArray() return an Object[] -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sascha Rodekamp reassigned OFBIZ-4425: -------------------------------------- Assignee: Sascha Rodekamp > Wrong use of toArray() method > ----------------------------- > > Key: OFBIZ-4425 > URL: https://issues.apache.org/jira/browse/OFBIZ-4425 > Project: OFBiz > Issue Type: Bug > Components: framework > Reporter: Dimitri Unruh > Assignee: Sascha Rodekamp > Attachments: OFBIZ-4425.patch > > > just a short example: > {code} > Collection<String> foo; > .... > String[] temp = (String[]) foo.toArray(); > {code} > So we will get (usually ) a ClassCastException, because toArray() return an Object[] -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sascha Rodekamp closed OFBIZ-4425. ---------------------------------- Resolution: Fixed Fix Version/s: SVN trunk Thanks Dimitri (again :-) ) Your patch is in trunk @Rev1173607 > Wrong use of toArray() method > ----------------------------- > > Key: OFBIZ-4425 > URL: https://issues.apache.org/jira/browse/OFBIZ-4425 > Project: OFBiz > Issue Type: Bug > Components: framework > Reporter: Dimitri Unruh > Assignee: Sascha Rodekamp > Fix For: SVN trunk > > Attachments: OFBIZ-4425.patch > > > just a short example: > {code} > Collection<String> foo; > .... > String[] temp = (String[]) foo.toArray(); > {code} > So we will get (usually ) a ClassCastException, because toArray() return an Object[] -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira |
Free forum by Nabble | Edit this page |