jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1418308 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/SamplerCreatorFactory.java
Date Fri, 07 Dec 2012 13:37:52 GMT
Author: pmouawad
Date: Fri Dec  7 13:37:50 2012
New Revision: 1418308

URL: http://svn.apache.org/viewvc?rev=1418308&view=rev
Log:
Add warning when a SamplerCreator is already registered for a content type and removed

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/SamplerCreatorFactory.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/SamplerCreatorFactory.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/SamplerCreatorFactory.java?rev=1418308&r1=1418307&r2=1418308&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/SamplerCreatorFactory.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/SamplerCreatorFactory.java
Fri Dec  7 13:37:50 2012
@@ -69,7 +69,11 @@ public class SamplerCreatorFactory {
                                 if(log.isDebugEnabled()) {
                                     log.debug("Registering samplerCreator "+commandClass.getName()+"
for content type:"+contentType);
                                 }
-                                samplerCreatorMap.put(contentType, creator);
+                                SamplerCreator oldSamplerCreator = samplerCreatorMap.put(contentType,
creator);
+                                if(oldSamplerCreator!=null) {
+                                    log.warn("A sampler creator was already registered for:"+contentType+",
class:"+oldSamplerCreator.getClass()
+                                            + ", it will be replaced");
+                                }
                             }                        
                     }
                 } catch (Exception e) {



Mime
View raw message