jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1457590 [2/2] - in /jmeter/trunk/src: core/org/apache/jmeter/ core/org/apache/jmeter/reporters/ core/org/apache/jmeter/samplers/ core/org/apache/jmeter/services/ core/org/apache/jmeter/testbeans/gui/ core/org/apache/jmeter/testelement/ cor...
Date Sun, 17 Mar 2013 23:28:27 GMT
Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java?rev=1457590&r1=1457589&r2=1457590&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java Sun Mar 17 23:28:26 2013
@@ -320,7 +320,7 @@ public class ProxyControl extends Generi
     }
 
     public void addConfigElement(ConfigElement config) {
-    	// NOOP
+        // NOOP
     }
 
     public void startProxy() throws IOException {
@@ -413,7 +413,7 @@ public class ProxyControl extends Generi
             try {
                 server.join(1000); // wait for server to stop
             } catch (InterruptedException e) {
-            	//NOOP
+                //NOOP
             }
             notifyTestListenersOfEnd();
             server = null;
@@ -521,7 +521,7 @@ public class ProxyControl extends Generi
      * Called from AWT Event thread
      */
     private void addAssertion(JMeterTreeModel model, JMeterTreeNode node) throws IllegalUserActionException {
-    	ResponseAssertion ra = new ResponseAssertion();
+        ResponseAssertion ra = new ResponseAssertion();
         ra.setProperty(TestElement.GUI_CLASS, ASSERTION_GUI);
         ra.setName(JMeterUtils.getResString("assertion_title")); // $NON-NLS-1$
         ra.setTestFieldResponseData();
@@ -537,16 +537,16 @@ public class ProxyControl extends Generi
         sc.setProperty(TestElement.GUI_CLASS, LOGIC_CONTROLLER_GUI);
         sc.setName("-------------------"); // $NON-NLS-1$
         JMeterUtils.runSafe(new Runnable() {
-			@Override
+            @Override
             public void run() {
-				try {
-					model.addComponent(sc, node);
-				} catch (IllegalUserActionException e) {
-					log.error("Program error", e);
-			        throw new Error(e);
-				}		
-			}
-		});
+                try {
+                    model.addComponent(sc, node);
+                } catch (IllegalUserActionException e) {
+                    log.error("Program error", e);
+                    throw new Error(e);
+                }
+            }
+        });
     }
 
     /**
@@ -563,20 +563,20 @@ public class ProxyControl extends Generi
      */
     private void addSimpleController(final JMeterTreeModel model, final JMeterTreeNode node, String name)
             throws InterruptedException, InvocationTargetException {
-    	final GenericController sc = new GenericController();
+        final GenericController sc = new GenericController();
         sc.setProperty(TestElement.GUI_CLASS, LOGIC_CONTROLLER_GUI);
         sc.setName(name);
         JMeterUtils.runSafe(new Runnable() {
-			@Override
+            @Override
             public void run() {
-		        try {
-					model.addComponent(sc, node);
-				} catch (IllegalUserActionException e) {
-					 log.error("Program error", e);
-					 throw new Error(e);
-				}				
-			}
-		});
+                try {
+                    model.addComponent(sc, node);
+                } catch (IllegalUserActionException e) {
+                     log.error("Program error", e);
+                     throw new Error(e);
+                }
+            }
+        });
     }
 
     /**
@@ -597,16 +597,16 @@ public class ProxyControl extends Generi
         sc.setProperty(TestElement.GUI_CLASS, TRANSACTION_CONTROLLER_GUI);
         sc.setName(name);
         JMeterUtils.runSafe(new Runnable() {
-			@Override
+            @Override
             public void run() {
-				 try {
-					model.addComponent(sc, node);
-				} catch (IllegalUserActionException e) {
-					log.error("Program error", e);
+                 try {
+                    model.addComponent(sc, node);
+                } catch (IllegalUserActionException e) {
+                    log.error("Program error", e);
                     throw new Error(e);
-				}
-			}
-		});
+                }
+            }
+        });
     }
     /**
      * Helpler method to replicate any timers found within the Proxy Controller
@@ -783,7 +783,7 @@ public class ProxyControl extends Generi
     }
 
     private void placeSampler(final HTTPSamplerBase sampler, final TestElement[] subConfigs, 
-    		JMeterTreeNode myTarget) {
+            JMeterTreeNode myTarget) {
         try {
             final JMeterTreeModel treeModel = GuiPackage.getInstance().getTreeModel();
 
@@ -835,29 +835,29 @@ public class ProxyControl extends Generi
             final boolean firstInBatchFinal = firstInBatch;
             final JMeterTreeNode myTargetFinal = myTarget;
             JMeterUtils.runSafe(new Runnable() {
-				@Override
+                @Override
                 public void run() {
-					try {
-			            final JMeterTreeNode newNode = treeModel.addComponent(sampler, myTargetFinal);
-			            if (firstInBatchFinal) {
-			                if (addAssertions.get()) {
-			                    addAssertion(treeModel, newNode);
-			                }
-			                addTimers(treeModel, newNode, deltaTFinal);
-			            }
-	
-			            for (int i = 0; subConfigs != null && i < subConfigs.length; i++) {
-			                if (subConfigs[i] instanceof HeaderManager) {
-			                	final TestElement headerManager = subConfigs[i];
-			                	headerManager.setProperty(TestElement.GUI_CLASS, HEADER_PANEL);
-			                    treeModel.addComponent(headerManager, newNode);
-			                }
-			            }
-					} catch (IllegalUserActionException e) {
-			            JMeterUtils.reportErrorToUser(e.getMessage());
-			        }
-				}
-			});
+                    try {
+                        final JMeterTreeNode newNode = treeModel.addComponent(sampler, myTargetFinal);
+                        if (firstInBatchFinal) {
+                            if (addAssertions.get()) {
+                                addAssertion(treeModel, newNode);
+                            }
+                            addTimers(treeModel, newNode, deltaTFinal);
+                        }
+
+                        for (int i = 0; subConfigs != null && i < subConfigs.length; i++) {
+                            if (subConfigs[i] instanceof HeaderManager) {
+                                final TestElement headerManager = subConfigs[i];
+                                headerManager.setProperty(TestElement.GUI_CLASS, HEADER_PANEL);
+                                treeModel.addComponent(headerManager, newNode);
+                            }
+                        }
+                    } catch (IllegalUserActionException e) {
+                        JMeterUtils.reportErrorToUser(e.getMessage());
+                    }
+                }
+            });
         } catch (Exception e) {
             JMeterUtils.reportErrorToUser(e.getMessage());
         } 

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java?rev=1457590&r1=1457589&r2=1457590&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java Sun Mar 17 23:28:26 2013
@@ -136,14 +136,14 @@ public class HTTPHC4Impl extends HTTPHCA
         }
     };
     private static final HttpRequestInterceptor METRICS_RESETTER = new HttpRequestInterceptor() {
-		@Override
+        @Override
         public void process(HttpRequest request, HttpContext context)
-				throws HttpException, IOException {
+                throws HttpException, IOException {
             HttpConnection conn = (HttpConnection) context.getAttribute(ExecutionContext.HTTP_CONNECTION);
-			HttpConnectionMetrics metrics = conn.getMetrics();
-			metrics.reset();
-		}
-	};
+            HttpConnectionMetrics metrics = conn.getMetrics();
+            metrics.reset();
+        }
+    };
 
     private static final ThreadLocal<Map<HttpClientKey, HttpClient>> HTTPCLIENTS = 
         new ThreadLocal<Map<HttpClientKey, HttpClient>>(){
@@ -1122,8 +1122,8 @@ public class HTTPHC4Impl extends HTTPHCA
         Map<HttpClientKey, HttpClient> map = HTTPCLIENTS.get();
         if ( map != null ) {
             for ( HttpClient cl : map.values() ) {
-            	((AbstractHttpClient) cl).clearRequestInterceptors(); 
-            	((AbstractHttpClient) cl).clearResponseInterceptors(); 
+                ((AbstractHttpClient) cl).clearRequestInterceptors(); 
+                ((AbstractHttpClient) cl).clearResponseInterceptors(); 
                 cl.getConnectionManager().shutdown();
             }
             map.clear();

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java?rev=1457590&r1=1457589&r2=1457590&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java Sun Mar 17 23:28:26 2013
@@ -264,9 +264,9 @@ public abstract class HTTPSamplerBase ex
     private static final String RESPONSE_PARSERS= // list of parsers
         JMeterUtils.getProperty("HTTPResponse.parsers");//$NON-NLS-1$
 
-	// Control reuse of cached SSL Context in subsequent iterations
-	private static final boolean USE_CACHED_SSL_CONTEXT = 
-	        JMeterUtils.getPropDefault("https.use.cached.ssl.context", true);//$NON-NLS-1$
+    // Control reuse of cached SSL Context in subsequent iterations
+    private static final boolean USE_CACHED_SSL_CONTEXT = 
+            JMeterUtils.getPropDefault("https.use.cached.ssl.context", true);//$NON-NLS-1$
     
     static{
         String []parsers = JOrphanUtils.split(RESPONSE_PARSERS, " " , true);// returns empty array for null
@@ -294,8 +294,8 @@ public abstract class HTTPSamplerBase ex
             log.info("No response parsers defined: text/html only will be scanned for embedded resources");
         }
         
-		log.info("Reuse SSL session context on subsequent iterations: "
-				+ USE_CACHED_SSL_CONTEXT);
+        log.info("Reuse SSL session context on subsequent iterations: "
+                + USE_CACHED_SSL_CONTEXT);
     }
 
     // Bug 49083
@@ -1296,12 +1296,12 @@ public abstract class HTTPSamplerBase ex
      * @param initialValue boolean
      */
     private void setParentSampleSuccess(HTTPSampleResult res, boolean initialValue) {
-		if(!IGNORE_FAILED_EMBEDDED_RESOURCES) {
-			res.setSuccessful(initialValue);
-		}
-	}
+        if(!IGNORE_FAILED_EMBEDDED_RESOURCES) {
+            res.setSuccessful(initialValue);
+        }
+    }
 
-	/*
+    /*
      * @param res HTTPSampleResult to check
      * @return parser class name (may be "") or null if entry does not exist
      */
@@ -1330,26 +1330,26 @@ public abstract class HTTPSamplerBase ex
         testEnded();
     }
 
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
+    /**
+     * {@inheritDoc}
+     */
+    @Override
     public void testIterationStart(LoopIterationEvent event) {
-		if (!USE_CACHED_SSL_CONTEXT) {
-			JsseSSLManager sslMgr = (JsseSSLManager) SSLManager.getInstance();
-			sslMgr.resetContext();
-			notifySSLContextWasReset();
-		}
-	}
-
-	/**
-	 * Called by testIterationStart if the SSL Context was reset.
-	 * 
-	 * This implementation does nothing.
-	 */
-	protected void notifySSLContextWasReset() {
-		// NOOP
-	}
+        if (!USE_CACHED_SSL_CONTEXT) {
+            JsseSSLManager sslMgr = (JsseSSLManager) SSLManager.getInstance();
+            sslMgr.resetContext();
+            notifySSLContextWasReset();
+        }
+    }
+
+    /**
+     * Called by testIterationStart if the SSL Context was reset.
+     * 
+     * This implementation does nothing.
+     */
+    protected void notifySSLContextWasReset() {
+        // NOOP
+    }
 
     /**
      * {@inheritDoc}
@@ -1775,7 +1775,7 @@ public abstract class HTTPSamplerBase ex
         final private boolean areFollowingRedirect;
         final private int depth;
         private final HTTPSamplerBase sampler;
-		private final JMeterContext jmeterContextOfParentThread;
+        private final JMeterContext jmeterContextOfParentThread;
 
         ASyncSample(URL url, String method,
                 boolean areFollowingRedirect, int depth,  CookieManager cookieManager, HTTPSamplerBase base){
@@ -1799,7 +1799,7 @@ public abstract class HTTPSamplerBase ex
 
         @Override
         public AsynSamplerResultHolder call() {
-        	JMeterContextService.replaceContext(jmeterContextOfParentThread);
+            JMeterContextService.replaceContext(jmeterContextOfParentThread);
             ((CleanerThread) Thread.currentThread()).registerSamplerForEndNotification(sampler);
             HTTPSampleResult httpSampleResult = sampler.sample(url, method, areFollowingRedirect, depth);
             if(sampler.getCookieManager() != null) {

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.java?rev=1457590&r1=1457589&r2=1457590&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.java Sun Mar 17 23:28:26 2013
@@ -537,7 +537,7 @@ public class TCLogParser implements LogP
      * @return List<String>
      */
     protected List<String> parseParameters(String parameters) {
-    	List<String> parsedParams = new ArrayList<String>();
+        List<String> parsedParams = new ArrayList<String>();
         StringTokenizer paramtokens = this.tokenize(parameters, "&");
         while (paramtokens.hasMoreElements()) {
             parsedParams.add(paramtokens.nextToken());

Modified: jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java?rev=1457590&r1=1457589&r2=1457590&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java (original)
+++ jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java Sun Mar 17 23:28:26 2013
@@ -239,7 +239,7 @@ public abstract class AbstractJDBCTestEl
             }
             String varnames[] = getVariableNames().split(COMMA);
             if(varnames.length > 0) {
-        	JMeterVariables jmvars = getThreadContext().getVariables();
+            JMeterVariables jmvars = getThreadContext().getVariables();
                 for(int i = 0; i < varnames.length && i < outputValues.size(); i++) {
                     String name = varnames[i].trim();
                     if (name.length()>0){ // Save the value in the variable if present
@@ -559,50 +559,50 @@ public abstract class AbstractJDBCTestEl
     }    
 
 
-	/** 
-	 * {@inheritDoc}
-	 * @see org.apache.jmeter.testelement.TestStateListener#testStarted()
-	 */
-	@Override
+    /** 
+     * {@inheritDoc}
+     * @see org.apache.jmeter.testelement.TestStateListener#testStarted()
+     */
+    @Override
     public void testStarted() {
-		testStarted("");
-	}
+        testStarted("");
+    }
 
-	/**
-	 * {@inheritDoc}
-	 * @see org.apache.jmeter.testelement.TestStateListener#testStarted(java.lang.String)
-	 */
-	@Override
+    /**
+     * {@inheritDoc}
+     * @see org.apache.jmeter.testelement.TestStateListener#testStarted(java.lang.String)
+     */
+    @Override
     public void testStarted(String host) {
-		cleanCache();
-	}
+        cleanCache();
+    }
 
-	/**
-	 * {@inheritDoc}
-	 * @see org.apache.jmeter.testelement.TestStateListener#testEnded()
-	 */
-	@Override
+    /**
+     * {@inheritDoc}
+     * @see org.apache.jmeter.testelement.TestStateListener#testEnded()
+     */
+    @Override
     public void testEnded() {
-		testEnded("");
-	}
+        testEnded("");
+    }
 
-	/**
-	 * {@inheritDoc}
-	 * @see org.apache.jmeter.testelement.TestStateListener#testEnded(java.lang.String)
-	 */
-	@Override
+    /**
+     * {@inheritDoc}
+     * @see org.apache.jmeter.testelement.TestStateListener#testEnded(java.lang.String)
+     */
+    @Override
     public void testEnded(String host) {
-		cleanCache();		
-	}
-	
-	/**
-	 * Clean cache of PreparedStatements
-	 */
-	private static final void cleanCache() {
-		for (Map<String, PreparedStatement> element : perConnCache.values()) {
-			closeAllStatements(element.values());
-		}
-		perConnCache.clear();
-	}
+        cleanCache();
+    }
+    
+    /**
+     * Clean cache of PreparedStatements
+     */
+    private static final void cleanCache() {
+        for (Map<String, PreparedStatement> element : perConnCache.values()) {
+            closeAllStatements(element.values());
+        }
+        perConnCache.clear();
+    }
 
 }
\ No newline at end of file

Modified: jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ReceiveSubscriber.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ReceiveSubscriber.java?rev=1457590&r1=1457589&r2=1457590&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ReceiveSubscriber.java (original)
+++ jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ReceiveSubscriber.java Sun Mar 17 23:28:26 2013
@@ -187,32 +187,32 @@ public class ReceiveSubscriber implement
     /**
      * Return a simple MessageConsumer or a TopicSubscriber (as a durable subscription)
      * @param session
-     * 				JMS session	
+     *                 JMS session
      * @param destination
-     * 				JMS destination, can be either topic or queue
+     *                 JMS destination, can be either topic or queue
      * @param durableSubscriptionId 
-     * 				If neither empty nor null, this means that a durable 
-     * 				subscription will be used
+     *                 If neither empty nor null, this means that a durable 
+     *                 subscription will be used
      * @param jmsSelector JMS Selector
      * @return
      * @throws JMSException
      */
     private MessageConsumer createSubscriber(Session session, 
-    		Destination destination, String durableSubscriptionId, 
-    		String jmsSelector) throws JMSException {
-    	if (isEmpty(durableSubscriptionId)) {
-    	    if(isEmpty(jmsSelector)) {
-    	        return session.createConsumer(destination);
-    	    } else {
-    	        return session.createConsumer(destination, jmsSelector);
-    	    }
+            Destination destination, String durableSubscriptionId, 
+            String jmsSelector) throws JMSException {
+        if (isEmpty(durableSubscriptionId)) {
+            if(isEmpty(jmsSelector)) {
+                return session.createConsumer(destination);
+            } else {
+                return session.createConsumer(destination, jmsSelector);
+            }
         } else {
             if(isEmpty(jmsSelector)) {
                 return session.createDurableSubscriber((Topic) destination, durableSubscriptionId); 
             } else {
                 return session.createDurableSubscriber((Topic) destination, durableSubscriptionId, jmsSelector, false);                 
             }
-        }	
+        }
     }
 
     /**
@@ -298,10 +298,9 @@ public class ReceiveSubscriber implement
      * Checks whether string is empty
      * 
      * @param s1
-     * @return True if input is null, an empty string, 
-     * 				or a white space-only string
+     * @return True if input is null, an empty string, or a white space-only string
      */
     private boolean isEmpty(String s1) {
-    	return (s1 == null || s1.trim().equals(""));
+        return (s1 == null || s1.trim().equals(""));
     }
 }

Modified: jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java?rev=1457590&r1=1457589&r2=1457590&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java (original)
+++ jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java Sun Mar 17 23:28:26 2013
@@ -95,7 +95,7 @@ public class SubscriberSampler extends B
     
     private transient boolean START_ON_SAMPLE = false;
 
-	private transient String separator;
+    private transient String separator;
 
     public SubscriberSampler() {
         super();
@@ -265,8 +265,8 @@ public class SubscriberSampler extends B
                 }
                 Utils.messageProperties(propBuffer, msg);
                 if(!isLast && !StringUtils.isEmpty(separator)) {
-                	propBuffer.append(separator);
-                	buffer.append(separator);
+                    propBuffer.append(separator);
+                    buffer.append(separator);
                 }
             } catch (JMSException e) {
                 log.error(e.getMessage());
@@ -473,7 +473,7 @@ public class SubscriberSampler extends B
      */
     @Override
     public void testStarted() {
-    	testStarted("");
+        testStarted("");
     }
 
     /**
@@ -481,19 +481,19 @@ public class SubscriberSampler extends B
      */
     @Override
     public void testStarted(String host) {
-    	// NOOP
+        // NOOP
+    }
+
+    /**
+     * 
+     */
+    private void setupSeparator() {
+        separator = getSeparator();
+        separator = separator.replace("\\t", "\t");
+        separator = separator.replace("\\n", "\n");
+        separator = separator.replace("\\r", "\r");
     }
 
-	/**
-	 * 
-	 */
-	private void setupSeparator() {
-		separator = getSeparator();
-		separator = separator.replace("\\t", "\t");
-		separator = separator.replace("\\n", "\n");
-		separator = separator.replace("\\r", "\r");
-	}
-	
     private Object readResolve(){
         setupSeparator();
         exceptionDuringInit=null;

Modified: jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/NativeCommand.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/NativeCommand.java?rev=1457590&r1=1457589&r2=1457590&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/NativeCommand.java (original)
+++ jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/NativeCommand.java Sun Mar 17 23:28:26 2013
@@ -33,7 +33,7 @@ import org.apache.jorphan.util.JOrphanUt
  */
 public class NativeCommand {
 
-	private StreamGobbler outputGobbler;
+    private StreamGobbler outputGobbler;
     private final File directory;
     private final Map<String, String> env;
     private Map<String, String> executionEnvironment;
@@ -41,22 +41,22 @@ public class NativeCommand {
     private final String stdout;
     private final String stderr;
 
-	/**
-	 * @param env Environment variables appended to environment
-	 * @param directory File working directory
-	 */
-	public NativeCommand(File directory, Map<String, String> env) {
-	    this(directory, env, null, null, null);
-	}
+    /**
+     * @param env Environment variables appended to environment
+     * @param directory File working directory
+     */
+    public NativeCommand(File directory, Map<String, String> env) {
+        this(directory, env, null, null, null);
+    }
 
-	/**
-	 * 
+    /**
+     * 
      * @param env Environment variables appended to environment
      * @param directory File working directory
-	 * @param stdin File name that will contain data to be input to process
-	 * @param stdout File name that will contain out stream
-	 * @param stderr File name that will contain err stream
-	 */
+     * @param stdin File name that will contain data to be input to process
+     * @param stdout File name that will contain out stream
+     * @param stderr File name that will contain err stream
+     */
     public NativeCommand(File directory, Map<String, String> env, String stdin, String stdout, String stderr) {
         super();
         this.directory = directory;
@@ -66,23 +66,23 @@ public class NativeCommand {
         this.stderr = JOrphanUtils.nullifyIfEmptyTrimmed(stderr);
     }
 
-	/**
-	 * @param arguments List<String>
-	 * @return return code
-	 * @throws InterruptedException
-	 * @throws IOException
-	 */
-	public int run(List<String> arguments) throws InterruptedException, IOException {
-		Process proc = null;
-		try
-		{
-		    ProcessBuilder procBuild = new ProcessBuilder(arguments);
-		    procBuild.environment().putAll(env);
-		    this.executionEnvironment = Collections.unmodifiableMap(procBuild.environment());
-		    procBuild.directory(directory);
-		    if (stderr == null || stderr.equals(stdout)) { // we're not redirecting stderr separately
-		        procBuild.redirectErrorStream(true);
-		    }
+    /**
+     * @param arguments List<String>
+     * @return return code
+     * @throws InterruptedException
+     * @throws IOException
+     */
+    public int run(List<String> arguments) throws InterruptedException, IOException {
+        Process proc = null;
+        try
+        {
+            ProcessBuilder procBuild = new ProcessBuilder(arguments);
+            procBuild.environment().putAll(env);
+            this.executionEnvironment = Collections.unmodifiableMap(procBuild.environment());
+            procBuild.directory(directory);
+            if (stderr == null || stderr.equals(stdout)) { // we're not redirecting stderr separately
+                procBuild.redirectErrorStream(true);
+            }
             proc = procBuild.start();
             StreamCopier swerr = null;
             if (!procBuild.redirectErrorStream()) { // stderr has separate output file
@@ -100,50 +100,50 @@ public class NativeCommand {
             }
             
             StreamCopier swin = null;
-	        if (stdin != null) {
-	            swin = new StreamCopier(new FileInputStream(stdin), proc.getOutputStream());
-	            swin.start();
-	        }
-			int exitVal = proc.waitFor();
-
-			if (outputGobbler != null) {
-			    outputGobbler.join();
-			}
-			if (swout != null) {
-			    swout.join();
-			}
-			if (swerr != null) {
-			    swerr.join();
-			}
-			if (swin != null) {
-			    swin.interrupt(); // the copying thread won't generally detect EOF
-			    swin.join();
-			}
-			return exitVal;
-		}
-		finally
-		{
-			if(proc != null)
-			{
-				try {
-					proc.destroy();
-				} catch (Exception ignored) {
-					// Ignored
-				}
-			}
-		}
-	}
-
-	/**
-	 * @return Out/Err stream contents
-	 */
-	public String getOutResult() {
-	    if(outputGobbler != null) {    
-	        return outputGobbler.getResult();
-	    } else {
-	        return "";
-	    }
-	}
+            if (stdin != null) {
+                swin = new StreamCopier(new FileInputStream(stdin), proc.getOutputStream());
+                swin.start();
+            }
+            int exitVal = proc.waitFor();
+
+            if (outputGobbler != null) {
+                outputGobbler.join();
+            }
+            if (swout != null) {
+                swout.join();
+            }
+            if (swerr != null) {
+                swerr.join();
+            }
+            if (swin != null) {
+                swin.interrupt(); // the copying thread won't generally detect EOF
+                swin.join();
+            }
+            return exitVal;
+        }
+        finally
+        {
+            if(proc != null)
+            {
+                try {
+                    proc.destroy();
+                } catch (Exception ignored) {
+                    // Ignored
+                }
+            }
+        }
+    }
+
+    /**
+     * @return Out/Err stream contents
+     */
+    public String getOutResult() {
+        if(outputGobbler != null) {    
+            return outputGobbler.getResult();
+        } else {
+            return "";
+        }
+    }
 
     /**
      * @return the executionEnvironment

Modified: jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/StreamCopier.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/StreamCopier.java?rev=1457590&r1=1457589&r2=1457590&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/StreamCopier.java (original)
+++ jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/StreamCopier.java Sun Mar 17 23:28:26 2013
@@ -37,22 +37,22 @@ class StreamCopier extends Thread {
     private final InputStream is;
     private final OutputStream os;
 
-	/**
+    /**
      * @param is {@link InputStream}
-	 * @param is {@link OutputStream}
-	 * @throws IOException 
-	 */
-	StreamCopier(InputStream is, OutputStream os) throws IOException {
-		this.is = is;
-		this.os = os;
-	}
+     * @param is {@link OutputStream}
+     * @throws IOException 
+     */
+    StreamCopier(InputStream is, OutputStream os) throws IOException {
+        this.is = is;
+        this.os = os;
+    }
 
-	/**
-	 * @see java.lang.Thread#run()
-	 */
-	@Override
+    /**
+     * @see java.lang.Thread#run()
+     */
+    @Override
     public void run() {
-	    try {
+        try {
             IOUtils.copyLarge(is, os);
             os.close();
             is.close();
@@ -62,6 +62,6 @@ class StreamCopier extends Thread {
             IOUtils.closeQuietly(is);
             IOUtils.closeQuietly(os);
         }
-	}
-	
+    }
+    
 }

Modified: jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/StreamGobbler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/StreamGobbler.java?rev=1457590&r1=1457589&r2=1457590&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/StreamGobbler.java (original)
+++ jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/StreamGobbler.java Sun Mar 17 23:28:26 2013
@@ -31,43 +31,43 @@ import org.apache.jorphan.util.JOrphanUt
  * http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
  */
 class StreamGobbler extends Thread {
-	private final InputStream is;
-	private final StringBuilder buffer = new StringBuilder();
-	/**
-	 * @param is {@link InputStream}
-	 */
-	StreamGobbler(InputStream is) {
-		this.is = is;
-	}
+    private final InputStream is;
+    private final StringBuilder buffer = new StringBuilder();
+    /**
+     * @param is {@link InputStream}
+     */
+    StreamGobbler(InputStream is) {
+        this.is = is;
+    }
 
-	/**
-	 * @see java.lang.Thread#run()
-	 */
-	@Override
+    /**
+     * @see java.lang.Thread#run()
+     */
+    @Override
     public void run() {
-		BufferedReader br = null;
-		try {
-			br = new BufferedReader(new InputStreamReader(is));
-			String line = null;
-			while ((line = br.readLine()) != null)
-			{
-				buffer.append(line);
-				buffer.append("\r\n");
-			}
-		} catch (IOException e) {
-			buffer.append(e.getMessage());
-		}
-		finally
-		{
-		    JOrphanUtils.closeQuietly(br);
-		}
-	}
-	
-	/**
-	 * @return Output
-	 */
-	public String getResult()
-	{
-		return buffer.toString();
-	}
+        BufferedReader br = null;
+        try {
+            br = new BufferedReader(new InputStreamReader(is));
+            String line = null;
+            while ((line = br.readLine()) != null)
+            {
+                buffer.append(line);
+                buffer.append("\r\n");
+            }
+        } catch (IOException e) {
+            buffer.append(e.getMessage());
+        }
+        finally
+        {
+            JOrphanUtils.closeQuietly(br);
+        }
+    }
+
+    /**
+     * @return Output
+     */
+    public String getResult()
+    {
+        return buffer.toString();
+    }
 }

Modified: jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/BinaryTCPClientImpl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/BinaryTCPClientImpl.java?rev=1457590&r1=1457589&r2=1457590&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/BinaryTCPClientImpl.java (original)
+++ jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/BinaryTCPClientImpl.java Sun Mar 17 23:28:26 2013
@@ -119,26 +119,26 @@ public class BinaryTCPClientImpl extends
      */
     @Override
     public String read(InputStream is) throws ReadException {
-    	ByteArrayOutputStream w = new ByteArrayOutputStream();
+        ByteArrayOutputStream w = new ByteArrayOutputStream();
         try {
-			byte[] buffer = new byte[4096];
-			int x = 0;
-			while ((x = is.read(buffer)) > -1) {
-			    w.write(buffer, 0, x);
-			    if (useEolByte && (buffer[x - 1] == eolByte)) {
-			        break;
-			    }
-			}
+            byte[] buffer = new byte[4096];
+            int x = 0;
+            while ((x = is.read(buffer)) > -1) {
+                w.write(buffer, 0, x);
+                if (useEolByte && (buffer[x - 1] == eolByte)) {
+                    break;
+                }
+            }
 
-			IOUtils.closeQuietly(w); // For completeness
-			final String hexString = JOrphanUtils.baToHexString(w.toByteArray());
-			if(log.isDebugEnabled()) {
-			    log.debug("Read: " + w.size() + "\n" + hexString);
-			}
-			return hexString;
-		} catch (IOException e) {
-			throw new ReadException("", e, JOrphanUtils.baToHexString(w.toByteArray()));
-		}
+            IOUtils.closeQuietly(w); // For completeness
+            final String hexString = JOrphanUtils.baToHexString(w.toByteArray());
+            if(log.isDebugEnabled()) {
+                log.debug("Read: " + w.size() + "\n" + hexString);
+            }
+            return hexString;
+        } catch (IOException e) {
+            throw new ReadException("", e, JOrphanUtils.baToHexString(w.toByteArray()));
+        }
     }
 
 }

Modified: jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/LengthPrefixedBinaryTCPClientImpl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/LengthPrefixedBinaryTCPClientImpl.java?rev=1457590&r1=1457589&r2=1457590&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/LengthPrefixedBinaryTCPClientImpl.java (original)
+++ jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/LengthPrefixedBinaryTCPClientImpl.java Sun Mar 17 23:28:26 2013
@@ -81,23 +81,23 @@ public class LengthPrefixedBinaryTCPClie
         int msgLen = 0;
         byte[] lengthBuffer = new byte[lengthPrefixLen];
         try {
-	        if (is.read(lengthBuffer, 0, lengthPrefixLen) == lengthPrefixLen) {
-	            msgLen = byteArrayToInt(lengthBuffer);
-	            msg = new byte[msgLen];
-	            int bytes = JOrphanUtils.read(is, msg, 0, msgLen);
-	            if (bytes < msgLen) {
-	                log.warn("Incomplete message read, expected: "+msgLen+" got: "+bytes);
-	            }
-	        }
-	
-	        String buffer = JOrphanUtils.baToHexString(msg);
-	        if(log.isDebugEnabled()) {
-	            log.debug("Read: " + msgLen + "\n" + buffer);
-	        }
-	        return buffer;
+            if (is.read(lengthBuffer, 0, lengthPrefixLen) == lengthPrefixLen) {
+                msgLen = byteArrayToInt(lengthBuffer);
+                msg = new byte[msgLen];
+                int bytes = JOrphanUtils.read(is, msg, 0, msgLen);
+                if (bytes < msgLen) {
+                    log.warn("Incomplete message read, expected: "+msgLen+" got: "+bytes);
+                }
+            }
+    
+            String buffer = JOrphanUtils.baToHexString(msg);
+            if(log.isDebugEnabled()) {
+                log.debug("Read: " + msgLen + "\n" + buffer);
+            }
+            return buffer;
         } 
         catch(IOException e) {
-        	throw new ReadException("", e, JOrphanUtils.baToHexString(msg));
+            throw new ReadException("", e, JOrphanUtils.baToHexString(msg));
         }
     }
 

Modified: jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/ReadException.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/ReadException.java?rev=1457590&r1=1457589&r2=1457590&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/ReadException.java (original)
+++ jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/ReadException.java Sun Mar 17 23:28:26 2013
@@ -22,32 +22,32 @@ package org.apache.jmeter.protocol.tcp.s
  */
 public class ReadException extends Exception {
 
-	private static final long serialVersionUID = -2770054697780959330L;
-	private final String partialResponse;
+    private static final long serialVersionUID = -2770054697780959330L;
+    private final String partialResponse;
 
-	/**
-	 * @deprecated For use by test code only (serialisation tests)
-	 */
-	@Deprecated
-	public ReadException() {
-	    this(null, null, null);
-	}
+    /**
+     * @deprecated For use by test code only (serialisation tests)
+     */
+    @Deprecated
+    public ReadException() {
+        this(null, null, null);
+    }
 
-	/**
-	 * Constructor
-	 * @param message Message
-	 * @param cause Source cause
-	 * @param partialResponse  Text read until error occured
-	 */
-	public ReadException(String message, Throwable cause, String partialResponse) {
-		super(message, cause);
-		this.partialResponse = partialResponse;
-	}
+    /**
+     * Constructor
+     * @param message Message
+     * @param cause Source cause
+     * @param partialResponse  Text read until error occured
+     */
+    public ReadException(String message, Throwable cause, String partialResponse) {
+        super(message, cause);
+        this.partialResponse = partialResponse;
+    }
 
-	/**
-	 * @return the partialResponse Text read until error occured
-	 */
-	public String getPartialResponse() {
-		return partialResponse;
-	}
+    /**
+     * @return the partialResponse Text read until error occured
+     */
+    public String getPartialResponse() {
+        return partialResponse;
+    }
 }
\ No newline at end of file

Modified: jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.java?rev=1457590&r1=1457589&r2=1457590&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.java (original)
+++ jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.java Sun Mar 17 23:28:26 2013
@@ -97,24 +97,24 @@ public class TCPClientImpl extends Abstr
      */
     @Override
     public String read(InputStream is) throws ReadException{
-    	ByteArrayOutputStream w = new ByteArrayOutputStream();
+        ByteArrayOutputStream w = new ByteArrayOutputStream();
         try {
-			byte[] buffer = new byte[4096];
-			int x = 0;
-			while ((x = is.read(buffer)) > -1) {
-			    w.write(buffer, 0, x);
-			    if (useEolByte && (buffer[x - 1] == eolByte)) {
-			        break;
-			    }
-			}
+            byte[] buffer = new byte[4096];
+            int x = 0;
+            while ((x = is.read(buffer)) > -1) {
+                w.write(buffer, 0, x);
+                if (useEolByte && (buffer[x - 1] == eolByte)) {
+                    break;
+                }
+            }
 
-			// do we need to close byte array (or flush it?)
-			if(log.isDebugEnabled()) {
-			    log.debug("Read: " + w.size() + "\n" + w.toString());
-			}
-			return w.toString(charset);
-		} catch (IOException e) {
-			throw new ReadException("", e, w.toString());
-		}
+            // do we need to close byte array (or flush it?)
+            if(log.isDebugEnabled()) {
+                log.debug("Read: " + w.size() + "\n" + w.toString());
+            }
+            return w.toString(charset);
+        } catch (IOException e) {
+            throw new ReadException("", e, w.toString());
+        }
     }
 }

Modified: jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java?rev=1457590&r1=1457589&r2=1457590&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java (original)
+++ jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java Sun Mar 17 23:28:26 2013
@@ -178,7 +178,7 @@ public class TCPSampler extends Abstract
                 SocketAddress sockaddr = new InetSocketAddress(getServer(), getPort());
                 con = new Socket();
                 if (getPropertyAsString(SO_LINGER,"").length() > 0){
-                	con.setSoLinger(true, getSoLinger());
+                    con.setSoLinger(true, getSoLinger());
                 }
                 con.connect(sockaddr, getConnectTimeout());
                 if(log.isDebugEnabled()) {
@@ -213,10 +213,10 @@ public class TCPSampler extends Abstract
      * @return String socket key in cache Map
      */
     private final String getSocketKey() {
-		return TCPKEY+"#"+getServer()+"#"+getPort()+"#"+getUsername()+"#"+getPassword();
-	}
+        return TCPKEY+"#"+getServer()+"#"+getPort()+"#"+getUsername()+"#"+getPassword();
+    }
 
-	public String getUsername() {
+    public String getUsername() {
         return getPropertyAsString(ConfigTestElement.USERNAME);
     }
 
@@ -237,19 +237,19 @@ public class TCPSampler extends Abstract
     }
 
     public void setCloseConnection(String close) {
-    	this.setProperty(CLOSE_CONNECTION, close, "");
+        this.setProperty(CLOSE_CONNECTION, close, "");
     }
 
     public boolean isCloseConnection() {
-    	return getPropertyAsBoolean(CLOSE_CONNECTION, CLOSE_CONNECTION_DEFAULT);
+        return getPropertyAsBoolean(CLOSE_CONNECTION, CLOSE_CONNECTION_DEFAULT);
     }
 
     public void setSoLinger(String soLinger) {
-    	this.setProperty(SO_LINGER, soLinger, "");
+        this.setProperty(SO_LINGER, soLinger, "");
     }
 
     public int getSoLinger() {
-    	return getPropertyAsInt(SO_LINGER);
+        return getPropertyAsInt(SO_LINGER);
     }
     
     public void setEolByte(String eol) {
@@ -437,49 +437,49 @@ public class TCPSampler extends Abstract
         return res;
     }
 
-	/**
-	 * Fills SampleResult object
-	 * @param sampleResult {@link SampleResult}
-	 * @param readResponse Response read until error occured
-	 * @param exception Source exception
+    /**
+     * Fills SampleResult object
+     * @param sampleResult {@link SampleResult}
+     * @param readResponse Response read until error occured
+     * @param exception Source exception
      * @param encoding sample encoding
-	 * @return boolean if sample is considered as successful
-	 */
-	private boolean setupSampleResult(SampleResult sampleResult,
-			String readResponse, 
-			Exception exception,
-			String encoding) {
-		sampleResult.setResponseData(readResponse, encoding);
-		sampleResult.setDataType(SampleResult.TEXT);
-		if(exception==null) {
-			sampleResult.setResponseCodeOK();
-			sampleResult.setResponseMessage("OK"); //$NON-NLS-1$
-		} else {
-			sampleResult.setResponseCode("500"); //$NON-NLS-1$
-			sampleResult.setResponseMessage(exception.toString()); //$NON-NLS-1$
-		}
-		boolean isSuccessful = exception == null;
-		// Reset the status code if the message contains one
-		if (!StringUtils.isEmpty(readResponse) && STATUS_PREFIX.length() > 0) {
-		    int i = readResponse.indexOf(STATUS_PREFIX);
-		    int j = readResponse.indexOf(STATUS_SUFFIX, i + STATUS_PREFIX.length());
-		    if (i != -1 && j > i) {
-		        String rc = readResponse.substring(i + STATUS_PREFIX.length(), j);
-		        sampleResult.setResponseCode(rc);
-		        isSuccessful = isSuccessful && checkResponseCode(rc);
-		        if (haveStatusProps) {
-		            sampleResult.setResponseMessage(statusProps.getProperty(rc, "Status code not found in properties")); //$NON-NLS-1$
-		        } else {
-		            sampleResult.setResponseMessage("No status property file");
-		        }
-		    } else {
-		        sampleResult.setResponseCode("999"); //$NON-NLS-1$
-		        sampleResult.setResponseMessage("Status value not found");
-		        isSuccessful = false;
-		    }
-		}
-		return isSuccessful;
-	}
+     * @return boolean if sample is considered as successful
+     */
+    private boolean setupSampleResult(SampleResult sampleResult,
+            String readResponse, 
+            Exception exception,
+            String encoding) {
+        sampleResult.setResponseData(readResponse, encoding);
+        sampleResult.setDataType(SampleResult.TEXT);
+        if(exception==null) {
+            sampleResult.setResponseCodeOK();
+            sampleResult.setResponseMessage("OK"); //$NON-NLS-1$
+        } else {
+            sampleResult.setResponseCode("500"); //$NON-NLS-1$
+            sampleResult.setResponseMessage(exception.toString()); //$NON-NLS-1$
+        }
+        boolean isSuccessful = exception == null;
+        // Reset the status code if the message contains one
+        if (!StringUtils.isEmpty(readResponse) && STATUS_PREFIX.length() > 0) {
+            int i = readResponse.indexOf(STATUS_PREFIX);
+            int j = readResponse.indexOf(STATUS_SUFFIX, i + STATUS_PREFIX.length());
+            if (i != -1 && j > i) {
+                String rc = readResponse.substring(i + STATUS_PREFIX.length(), j);
+                sampleResult.setResponseCode(rc);
+                isSuccessful = isSuccessful && checkResponseCode(rc);
+                if (haveStatusProps) {
+                    sampleResult.setResponseMessage(statusProps.getProperty(rc, "Status code not found in properties")); //$NON-NLS-1$
+                } else {
+                    sampleResult.setResponseMessage("No status property file");
+                }
+            } else {
+                sampleResult.setResponseCode("999"); //$NON-NLS-1$
+                sampleResult.setResponseMessage("Status value not found");
+                isSuccessful = false;
+            }
+        }
+        return isSuccessful;
+    }
 
     /**
      * @param rc response code
@@ -542,25 +542,25 @@ public class TCPSampler extends Abstract
     /**
      * Closes all connections, clears Map and remove thread local Map
      */
-	private void tearDown() {
-		Map<String, Object> cp = tp.get();
-		for (Map.Entry<String, Object> element : cp.entrySet()) {
-			if(element.getKey().startsWith(TCPKEY)) {
-				try {
-					((Socket)element.getValue()).close();
-				} catch (IOException e) {
-					// NOOP
-				}
-			}
-		}
-		cp.clear();
-		tp.remove();
-	}
+    private void tearDown() {
+        Map<String, Object> cp = tp.get();
+        for (Map.Entry<String, Object> element : cp.entrySet()) {
+            if(element.getKey().startsWith(TCPKEY)) {
+                try {
+                    ((Socket)element.getValue()).close();
+                } catch (IOException e) {
+                    // NOOP
+                }
+            }
+        }
+        cp.clear();
+        tp.remove();
+    }
     
     /**
      * @see org.apache.jmeter.samplers.AbstractSampler#applies(org.apache.jmeter.config.ConfigTestElement)
      */
-	@Override
+    @Override
     public boolean applies(ConfigTestElement configElement) {
         String guiClass = configElement.getProperty(TestElement.GUI_CLASS).getStringValue();
         return APPLIABLE_CONFIG_CLASSES.contains(guiClass);

Modified: jmeter/trunk/src/reports/org/apache/jmeter/gui/ReportGuiPackage.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/reports/org/apache/jmeter/gui/ReportGuiPackage.java?rev=1457590&r1=1457589&r2=1457590&view=diff
==============================================================================
--- jmeter/trunk/src/reports/org/apache/jmeter/gui/ReportGuiPackage.java (original)
+++ jmeter/trunk/src/reports/org/apache/jmeter/gui/ReportGuiPackage.java Sun Mar 17 23:28:26 2013
@@ -54,7 +54,7 @@ public final class ReportGuiPackage impl
     /** Logging. */
     private static final Logger log = LoggingManager.getLoggerForClass();
 
-	private static final Object LOCK = new Object();
+    private static final Object LOCK = new Object();
 
     /** Singleton instance. */
     private static volatile ReportGuiPackage guiPack;
@@ -130,13 +130,13 @@ public final class ReportGuiPackage impl
      */
     public static ReportGuiPackage getInstance(ReportTreeListener listener, ReportTreeModel treeModel) {
         if (guiPack == null) {
-        	synchronized (LOCK) {
-        		if(guiPack== null) {
-	                guiPack = new ReportGuiPackage();
-	                guiPack.setTreeListener(listener);
-	                guiPack.setTreeModel(treeModel);				
-        		}
-			}
+            synchronized (LOCK) {
+                if(guiPack== null) {
+                    guiPack = new ReportGuiPackage();
+                    guiPack.setTreeListener(listener);
+                    guiPack.setTreeModel(treeModel);
+                }
+            }
         }
         return guiPack;
     }

Modified: jmeter/trunk/src/reports/org/apache/jmeter/report/gui/action/ReportActionRouter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/reports/org/apache/jmeter/report/gui/action/ReportActionRouter.java?rev=1457590&r1=1457589&r2=1457590&view=diff
==============================================================================
--- jmeter/trunk/src/reports/org/apache/jmeter/report/gui/action/ReportActionRouter.java (original)
+++ jmeter/trunk/src/reports/org/apache/jmeter/report/gui/action/ReportActionRouter.java Sun Mar 17 23:28:26 2013
@@ -46,7 +46,7 @@ public final class ReportActionRouter im
 
     private static final Logger log = LoggingManager.getLoggerForClass();
 
-	private static final Object LOCK = new Object();
+    private static final Object LOCK = new Object();
 
     private Map<String, HashSet<ActionListener>> preActionListeners =
         new HashMap<String, HashSet<ActionListener>>();
@@ -303,12 +303,12 @@ public final class ReportActionRouter im
      */
     public static ReportActionRouter getInstance() {
         if (router == null) {
-        	synchronized (LOCK) {
-        		if(router == null) {
-	                router = new ReportActionRouter();
-	                router.populateCommandMap();				
-        		}
-			}
+            synchronized (LOCK) {
+                if(router == null) {
+                    router = new ReportActionRouter();
+                    router.populateCommandMap();
+                }
+            }
         }
         return router;
     }

Modified: jmeter/trunk/src/reports/org/apache/jmeter/report/gui/action/ReportStart.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/reports/org/apache/jmeter/report/gui/action/ReportStart.java?rev=1457590&r1=1457589&r2=1457590&view=diff
==============================================================================
--- jmeter/trunk/src/reports/org/apache/jmeter/report/gui/action/ReportStart.java (original)
+++ jmeter/trunk/src/reports/org/apache/jmeter/report/gui/action/ReportStart.java Sun Mar 17 23:28:26 2013
@@ -61,14 +61,14 @@ public class ReportStart extends Abstrac
             popupShouldSave(e);
             startEngine();
 //        } else if (e.getActionCommand().equals(ActionNames.ACTION_STOP)) {
-        	// FIXME engine is always null
+            // FIXME engine is always null
 //            if (engine != null) {
 //                ReportGuiPackage.getInstance().getMainFrame().showStoppingMessage("");
 //                engine.stopTest();
 //                engine = null;
 //            }
 //        } else if (e.getActionCommand().equals(ActionNames.ACTION_SHUTDOWN)) {
-        	// FIXME engine is always null
+            // FIXME engine is always null
 //            if (engine != null) {
 //                ReportGuiPackage.getInstance().getMainFrame().showStoppingMessage("");
 //                engine.askThreadsToStop();

Modified: jmeter/trunk/src/reports/org/apache/jmeter/report/writers/AbstractReportWriter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/reports/org/apache/jmeter/report/writers/AbstractReportWriter.java?rev=1457590&r1=1457589&r2=1457590&view=diff
==============================================================================
--- jmeter/trunk/src/reports/org/apache/jmeter/report/writers/AbstractReportWriter.java (original)
+++ jmeter/trunk/src/reports/org/apache/jmeter/report/writers/AbstractReportWriter.java Sun Mar 17 23:28:26 2013
@@ -68,7 +68,7 @@ public abstract class AbstractReportWrit
         File output = new File(getTargetDirectory());
         if (!output.exists() || !output.isDirectory()) {
             if(!output.mkdir()) {
-            	throw new IllegalStateException("Could not create directory:"+output.getAbsolutePath());
+                throw new IllegalStateException("Could not create directory:"+output.getAbsolutePath());
             }
         }
     }
@@ -82,8 +82,8 @@ public abstract class AbstractReportWrit
             // if the directory already exists and is a directory,
             // we just renamed to "archive.date"
             if(!output.renameTo(new File("archive." + getDayString()))) {
-            	throw new IllegalStateException("Could not rename directory:"+output.getAbsolutePath()+
-            			" to archive." + getDayString());
+                throw new IllegalStateException("Could not rename directory:"+output.getAbsolutePath()+
+                        " to archive." + getDayString());
             }
         }
     }



Mime
View raw message