You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2012/12/07 14:37:52 UTC
svn commit: r1418308 -
/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/SamplerCreatorFactory.java
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) {