Bug 49394 - Classcast Exception in ActionRouter.postActionPerformed
Summary: Classcast Exception in ActionRouter.postActionPerformed
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: Nightly (Please specify date)
Hardware: All Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Depends on:
Reported: 2010-06-06 12:54 UTC by Dave Brosius
Modified: 2010-08-17 12:51 UTC (History)
0 users

patch for class cast exception (1.41 KB, patch)
2010-06-06 12:54 UTC, Dave Brosius
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Brosius 2010-06-06 12:54:14 UTC
Created attachment 25533 [details]
patch for class cast exception

code uses the reflective version of toArray to convert a HashSet to an array, and casts it to the real type of the hashset. However, because of type erasure, there's no way for toArray to know what the correct type is, and instead returns an Object[] instead of an ActionListener[]. Changed code to use the non-reflective version of toArray which correctly returns the real type of the array.

Also changed preActionPerformed to use the non-reflective version as well, even though that code was correct. (But using this version is more performant).
Comment 1 Sebb 2010-06-06 15:58:11 UTC
Thanks, patch applied:

URL: http://svn.apache.org/viewvc?rev=951940&view=rev
Bug 49394 - Classcast Exception in ActionRouter.postActionPerformed


BTW, did you get a CCE, or was this a bug found by Findbugs?