Author: sebb
Date: Fri Nov 20 15:35:11 2009
New Revision: 882608

URL: http://svn.apache.org/viewvc?rev=882608&view=rev
Log:
Use interface rather than abstract implementation

Modified:
    
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java
    
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/MapProperty.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=882608&r1=882607&r2=882608&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
 Fri Nov 20 15:35:11 2009
@@ -242,7 +242,7 @@
      * Get the property type for this property. Used to convert raw values into
      * JMeterProperties.
      */
-    protected Class<? extends AbstractProperty> getPropertyType() {
+    protected Class<? extends JMeterProperty> getPropertyType() {
         return getClass();
     }
 

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/MapProperty.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/MapProperty.java?rev=882608&r1=882607&r2=882608&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/MapProperty.java
 (original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/MapProperty.java
 Fri Nov 20 15:35:11 2009
@@ -76,9 +76,9 @@
      * @see AbstractProperty#getPropertyType()
      */
     @Override
-    protected Class<? extends AbstractProperty> getPropertyType() {
+    protected Class<? extends JMeterProperty> getPropertyType() {
         if (value.size() > 0) {
-            return (Class<? extends AbstractProperty>) 
valueIterator().next().getClass();
+            return valueIterator().next().getClass();
         }
         return NullProperty.class;
     }
@@ -103,6 +103,7 @@
 
     private Map<String, JMeterProperty> cloneMap() {
         try {
+            @SuppressWarnings("unchecked") // value is the correct class
             Map<String, JMeterProperty> newCol = 
value.getClass().newInstance();
             PropertyIterator iter = valueIterator();
             while (iter.hasNext()) {
@@ -126,7 +127,7 @@
         }
     }
 
-    public void setMap(Map newMap) {
+    public void setMap(Map<?,?> newMap) {
         value = normalizeMap(newMap);
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org

Reply via email to