svn commit: r886009 - /jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java

[email protected]
Newsgroups gmane.comp.jakarta.jmeter.devel
Message-ID <[email protected]>
Author: sebb
Date: Tue Dec  1 23:40:15 2009
New Revision: 886009

URL: http://svn.apache.org/viewvc?rev=886009&view=rev
Log:
One more warning fixed ...

Modified:
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java

Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java?rev=886009&r1=886008&r2=886009&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java Tue Dec  1 23:40:15 2009
@@ -288,7 +288,9 @@
             Object item = iter.next();
             if (newColl == null) {
                 try {
-                    newColl = coll.getClass().newInstance();
+                    @SuppressWarnings("unchecked") // coll is of the correct type
+                    final Class<Collection<JMeterProperty>> class1 = (Class<Collection<JMeterProperty>>) coll.getClass();
+                    newColl = class1.newInstance();
                 } catch (Exception e) {
                     log.error("Bad collection", e);
                     return coll;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.