You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2010/02/23 17:09:13 UTC
svn commit: r915405 [2/3] - in /jakarta/jmeter/trunk/src:
components/org/apache/jmeter/assertions/
components/org/apache/jmeter/assertions/gui/
components/org/apache/jmeter/config/ components/org/apache/jmeter/control/
components/org/apache/jmeter/extr...
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeNode.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeNode.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeNode.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeNode.java Tue Feb 23 16:09:09 2010
@@ -144,7 +144,7 @@
public void nameChanged() {
treeModel.nodeChanged(this);
}
-
+
// Override in order to provide type safety
@Override
@SuppressWarnings("unchecked")
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/tree/NamedTreeNode.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/tree/NamedTreeNode.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/tree/NamedTreeNode.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/tree/NamedTreeNode.java Tue Feb 23 16:09:09 2010
@@ -13,7 +13,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
*/
package org.apache.jmeter.gui.tree;
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/HeaderAsPropertyRenderer.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/HeaderAsPropertyRenderer.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/HeaderAsPropertyRenderer.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/HeaderAsPropertyRenderer.java Tue Feb 23 16:09:09 2010
@@ -32,13 +32,13 @@
* Renders items in a JTable by converting from resource names.
*/
public class HeaderAsPropertyRenderer extends DefaultTableCellRenderer {
-
+
private static final long serialVersionUID = 240L;
public HeaderAsPropertyRenderer() {
super();
}
-
+
@Override
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column) {
@@ -58,10 +58,10 @@
/**
* Get the text for the value as the translation of the resource name.
- *
+ *
* @param value
- * @param column
- * @param row
+ * @param column
+ * @param row
* @return the text
*/
protected String getText(Object value, int row, int column) {
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/JLabeledRadioI18N.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/JLabeledRadioI18N.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/JLabeledRadioI18N.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/JLabeledRadioI18N.java Tue Feb 23 16:09:09 2010
@@ -42,7 +42,7 @@
* JLabeledRadio will create a set of Radio buttons with a label.
* This is a version of the original JLabelledRadio class, but modified
* to accept resource names rather than language strings.
- *
+ *
*/
public class JLabeledRadioI18N extends JPanel implements JLabeledField, ActionListener {
@@ -55,7 +55,7 @@
private final ArrayList<ChangeListener> mChangeListeners = new ArrayList<ChangeListener>(3);
/**
- *
+ *
* @param label_resouce text resource name for group label
* @param item_resources list of resource names for individual buttons
* @param selectedItem button to be selected (if not null)
@@ -79,10 +79,10 @@
*
* The resource name is used as the action command for the button model,
* and the reource value is used to set the button label.
- *
+ *
* @param resouces list of resource names
* @param selected initially selected resource (if not null)
- *
+ *
*/
private void init(String[] resouces, String selected) {
this.add(mLabel);
@@ -128,7 +128,7 @@
/**
* Set the group label from the resource name.
- *
+ *
* @param label_resource
*/
public final void setLabel(String label_resource) {
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java Tue Feb 23 16:09:09 2010
@@ -256,7 +256,7 @@
private void makeHelpMenu() {
// HELP MENU
helpMenu = makeMenuRes("help",'H'); //$NON-NLS-1$
-
+
JMenuItem contextHelp = makeMenuItemRes("help", 'H', ActionNames.HELP, KeyStrokes.HELP); //$NON-NLS-1$
JMenuItem whatClass = makeMenuItemRes("help_node", 'W', ActionNames.WHAT_CLASS, KeyStrokes.WHAT_CLASS);//$NON-NLS-1$
@@ -307,14 +307,14 @@
private static class LangMenuHelper{
final ActionRouter actionRouter = ActionRouter.getInstance();
final JMenu languageMenu;
-
+
LangMenuHelper(JMenu _languageMenu){
languageMenu = _languageMenu;
}
-
+
/**
* Create a language entry from the locale name.
- *
+ *
* @param locale - must also be a valid resource name
*/
void addLang(String locale){
@@ -323,14 +323,14 @@
language.addActionListener(actionRouter);
language.setActionCommand(ActionNames.CHANGE_LANGUAGE);
language.setName(locale); // This is used by the ChangeLanguage class to define the Locale
- languageMenu.add(language);
+ languageMenu.add(language);
}
}
/**
* Generate the list of supported languages.
- *
+ *
* @return list of languages
*/
// Also used by org.apache.jmeter.resources.PackageTest
@@ -360,7 +360,7 @@
static JMenu makeLanguageMenu() {
final JMenu languageMenu = makeMenuRes("choose_language",'C'); //$NON-NLS-1$
-
+
LangMenuHelper langMenu = new LangMenuHelper(languageMenu);
/*
@@ -431,7 +431,7 @@
private void makeFileMenu() {
// FILE MENU
fileMenu = makeMenuRes("file",'F'); //$NON-NLS-1$
-
+
JMenuItem file_save = makeMenuItemRes("save", 'S', ActionNames.SAVE, KeyStrokes.SAVE); //$NON-NLS-1$
file_save.setEnabled(true);
@@ -548,13 +548,13 @@
/**
* <p>Refreshes all texts in the menu and all submenus to a new locale.</p>
- *
+ *
* <p>Assumes that the item name is set to the resource key, so the resource can be retrieved.
* Certain action types do not follow this rule, @see JMeterMenuBar#isNotResource(String)</p>
*
* The Language Change event assumes that the name is the same as the locale name,
* so this additionally means that all supported locales must be defined as resources.
- *
+ *
*/
private void updateMenuElement(MenuElement menu) {
Component component = menu.getComponent();
@@ -585,14 +585,14 @@
/**
* Return true if component name is a resource.<br/>
* i.e it is not a hostname:<br/>
- *
+ *
* <tt>ActionNames.REMOTE_START</tt><br/>
* <tt>ActionNames.REMOTE_STOP</tt><br/>
* <tt>ActionNames.REMOTE_EXIT</tt><br/>
- *
+ *
* nor a filename:<br/>
* <tt>ActionNames.OPEN_RECENT</tt>
- *
+ *
* nor a look and feel prefix:<br/>
* <tt>ActionNames.LAF_PREFIX</tt>
*/
@@ -634,7 +634,7 @@
/**
* Make a menu from a resource string and set its mnemonic.
- *
+ *
* @param resource
* @param mnemonic
* @return the menu
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java Tue Feb 23 16:09:09 2010
@@ -352,7 +352,7 @@
return newMenuChoice;
}
-
+
/**
* Create a single menu item from the resource name.
*
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuInfo.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuInfo.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuInfo.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuInfo.java Tue Feb 23 16:09:09 2010
@@ -24,13 +24,13 @@
* Class to hold additional information needed when building the GUI lists
*/
public class MenuInfo {
-
+
private final String label;
private final String className;
private final JMeterGUIComponent guiComp;
-
+
public MenuInfo(String displayLabel, String classFullName) {
label = displayLabel;
className = classFullName;
@@ -42,14 +42,14 @@
className = classFullName;
guiComp = item;
}
-
+
public String getLabel(){
if (guiComp != null) {
return guiComp.getStaticLabel();
}
return label;
}
-
+
public String getClassName(){
return className;
}
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java Tue Feb 23 16:09:09 2010
@@ -90,12 +90,12 @@
private static final String ERROR_LOGGING = "ResultCollector.error_logging"; // $NON-NLS-1$
private static final String SUCCESS_ONLY_LOGGING = "ResultCollector.success_only_logging"; // $NON-NLS-1$
-
+
// Static variables
// Lock used to guard static mutable variables
private static final Object LOCK = new Object();
-
+
//@GuardedBy("LOCK")
private static final Map<String, FileEntry> files = new HashMap<String, FileEntry>();
@@ -117,19 +117,19 @@
* The instance count is used to keep track of whether any tests are currently running.
* It's not possible to use the constructor or threadStarted etc as tests may overlap
* e.g. a remote test may be started,
- * and then a local test started whilst the remote test is still running.
+ * and then a local test started whilst the remote test is still running.
*/
//@GuardedBy("LOCK")
private static int instanceCount; // Keep track of how many instances are active
// Instance variables (guarded by volatile)
-
+
private transient volatile PrintWriter out;
private volatile boolean inTest = false;
private volatile boolean isStats = false;
-
+
/** the summarizer to which this result collector will forward the samples */
private volatile Summariser summariser;
@@ -139,7 +139,7 @@
public ResultCollector() {
this(null);
}
-
+
public ResultCollector(Summariser summer) {
setErrorLogging(false);
setSuccessOnlyLogging(false);
@@ -240,7 +240,7 @@
if (instanceCount <= 0) {
finalizeFileOutput();
inTest = false;
- }
+ }
}
if(summariser != null) {
@@ -309,7 +309,7 @@
} else { // We are processing XML
try { // Assume XStream
bufferedInputStream = new BufferedInputStream(new FileInputStream(file));
- SaveService.loadTestResults(bufferedInputStream,
+ SaveService.loadTestResults(bufferedInputStream,
new ResultCollectorHelper(this, visualizer));
parsedOK = true;
} catch (Exception e) {
@@ -486,7 +486,7 @@
}
}
}
-
+
if(summariser != null) {
summariser.sampleOccurred(event);
}
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollectorHelper.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollectorHelper.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollectorHelper.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollectorHelper.java Tue Feb 23 16:09:09 2010
@@ -13,7 +13,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
*/
package org.apache.jmeter.reporters;
@@ -27,11 +27,11 @@
* directly to the visualiser if required.
*/
public class ResultCollectorHelper {
-
+
private final Visualizer visualizer;
private final boolean errorsOnly;
private final boolean successOnly;
-
+
public ResultCollectorHelper(ResultCollector resultCollector, Visualizer visualizer) {
this.visualizer = visualizer;
this.errorsOnly = resultCollector.isErrorLogging();
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultSaver.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultSaver.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultSaver.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultSaver.java Tue Feb 23 16:09:09 2010
@@ -189,7 +189,7 @@
sb.append(contentType.substring(i + 1));
}
} else {
- sb.append("unknown");
+ sb.append("unknown");
}
} else {
sb.append("unknown");
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java Tue Feb 23 16:09:09 2010
@@ -54,17 +54,17 @@
* this means that the delta interval is likely to be longer than the reporting interval.
*
* Also, the sum of the delta intervals will be larger than the overall elapsed time.
- *
+ *
* Data is accumulated according to the test element name.
*
*/
-public class Summariser extends AbstractTestElement
+public class Summariser extends AbstractTestElement
implements Serializable, SampleListener, TestListener, NoThreadClone, Remoteable {
/*
* N.B. NoThreadClone is used to ensure that the testStarted() methods will share the same
* instance as the sampleOccured() methods, so the testStarted() method can fetch the
- * Totals accumulator object for the samples to be stored in.
+ * Totals accumulator object for the samples to be stored in.
*/
private static final long serialVersionUID = 233L;
@@ -91,7 +91,7 @@
*/
//@GuardedBy("accumulators") - needed to ensure consistency between this and instanceCount
private static final Map<String, Totals> accumulators = new ConcurrentHashMap<String, Totals>();
-
+
//@GuardedBy("accumulators")
private static int instanceCount; // number of active tests
@@ -277,15 +277,15 @@
/*
* The testStarted/testEnded methods are called at the start and end of a test.
- *
+ *
* However, when a test is run on multiple nodes, there is no guarantee that all the
* testStarted() methods will be called before all the threadStart() or sampleOccurred()
* methods for other threads - nor that testEnded() will only be called after all
* sampleOccurred() calls. The ordering is only guaranteed within a single test.
- *
+ *
*/
-
-
+
+
/** {@inheritDoc} */
public void testStarted() {
testStarted("local");
@@ -300,9 +300,9 @@
* Called once for each Summariser in the test plan.
* There may be more than one summariser with the same name,
* however they will all be called before the test proper starts.
- * <p>
+ * <p>
* However, note that this applies to a single test only.
- * When running in client-server mode, testStarted() may be
+ * When running in client-server mode, testStarted() may be
* invoked after sampleOccurred().
* <p>
* {@inheritDoc}
@@ -330,7 +330,7 @@
synchronized (accumulators) {
instanceCount--;
if (instanceCount <= 0){
- totals = accumulators.entrySet();
+ totals = accumulators.entrySet();
}
}
if (totals == null) {// We're not done yet
@@ -358,7 +358,7 @@
}
if (TOOUT) {
System.out.println(str);
- }
+ }
}
}
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/DataStrippingSampleSender.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/DataStrippingSampleSender.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/DataStrippingSampleSender.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/DataStrippingSampleSender.java Tue Feb 23 16:09:09 2010
@@ -13,7 +13,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
*/
package org.apache.jmeter.samplers;
@@ -26,15 +26,15 @@
/**
* The standard remote sample reporting should be more friendly to the main purpose of
- * remote testing - which is scalability. To increase scalability, this class strips out the
+ * remote testing - which is scalability. To increase scalability, this class strips out the
* response data before sending.
- *
+ *
*
*/
public class DataStrippingSampleSender implements SampleSender, Serializable {
private static final long serialVersionUID = 1;
private static final Logger log = LoggingManager.getLoggerForClass();
-
+
private final RemoteSampleListener listener;
private final SampleSender decoratedSender;
@@ -52,7 +52,7 @@
this.listener = listener;
decoratedSender = null;
}
-
+
DataStrippingSampleSender(SampleSender decorate)
{
this.decoratedSender = decorate;
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/Interruptible.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/Interruptible.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/Interruptible.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/Interruptible.java Tue Feb 23 16:09:09 2010
@@ -24,10 +24,10 @@
*
*/
public interface Interruptible {
-
+
/**
* Interrupt the current operation if possible.
- *
+ *
* @return <code>true</code> if there was an operation to interrupt.
*/
public boolean interrupt();
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java Tue Feb 23 16:09:09 2010
@@ -44,7 +44,7 @@
public class SampleResult implements Serializable {
private static final long serialVersionUID = 233L;
-
+
// Needs to be accessible from Test code
static final Logger log = LoggingManager.getLoggerForClass();
@@ -342,7 +342,7 @@
/**
* Set the "marked" flag to show that the result has been written to the file.
- *
+ *
* @param filename
* @return true if the result was previously marked
*/
@@ -546,7 +546,7 @@
*
*/
public void setResponseData(final String response, final String encoding) {
- String encodeUsing = encoding != null? encoding : DEFAULT_CHARSET;
+ String encodeUsing = encoding != null? encoding : DEFAULT_CHARSET;
try {
responseData = response.getBytes(encodeUsing);
setDataEncoding(encodeUsing);
@@ -619,7 +619,7 @@
* Extract and save the DataEncoding and DataType from the parameter provided.
* Does not save the full content Type.
* @see #setContentType(String) which should be used to save the full content-type string
- *
+ *
* @param ct - content type (may be null)
*/
public void setEncodingAndType(String ct){
@@ -692,7 +692,7 @@
/**
* Returns the dataEncoding or the default if no dataEncoding was provided
- * @return the value of the dataEncoding or DEFAULT_ENCODING
+ * @return the value of the dataEncoding or DEFAULT_ENCODING
*/
public String getDataEncodingWithDefault() {
if (dataEncoding != null && dataEncoding.length() > 0) {
@@ -800,7 +800,7 @@
/**
* Stores the content-type string, e.g. "text/xml; charset=utf-8"
* @see #setEncodingAndType(String) which can be used to extract the charset.
- *
+ *
* @param string
*/
public void setContentType(String string) {
@@ -853,7 +853,7 @@
time = endTime - startTime - idleTime;
}
}
-
+
/**
* Set idle time pause.
* For use by SampleResultConverter/CSVSaveService.
@@ -964,10 +964,10 @@
public void setErrorCount(int i){// for reading from CSV files
// ignored currently
}
-
+
/*
* TODO: error counting needs to be sorted out.
- *
+ *
* At present the Statistical Sampler tracks errors separately
* It would make sense to move the error count here, but this would
* mean lots of changes.
@@ -1097,14 +1097,14 @@
// Bug 47394
/**
- * Allow custom SampleSenders to drop unwanted assertionResults
+ * Allow custom SampleSenders to drop unwanted assertionResults
*/
public void removeAssertionResults() {
this.assertionResults = null;
}
-
+
/**
- * Allow custom SampleSenders to drop unwanted subResults
+ * Allow custom SampleSenders to drop unwanted subResults
*/
public void removeSubResults() {
this.subResults = null;
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java Tue Feb 23 16:09:09 2010
@@ -226,7 +226,7 @@
private boolean threadCounts = _threadCounts;
private boolean sampleCount = _sampleCount;
-
+
private boolean idleTime = _idleTime;
// Does not appear to be used (yet)
@@ -284,7 +284,7 @@
* comma for CSV files.
*/
private static final String _delimiter;
-
+
private static final boolean _idleTime;
private static final String DEFAULT_DELIMITER = ","; // $NON_NLS-1$
@@ -823,7 +823,7 @@
public boolean saveIdleTime() {
return idleTime;
}
-
+
public void setIdleTime(boolean save) {
idleTime = save;
}
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSenderFactory.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSenderFactory.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSenderFactory.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSenderFactory.java Tue Feb 23 16:09:09 2010
@@ -27,7 +27,7 @@
public class SampleSenderFactory {
private static final Logger log = LoggingManager.getLoggerForClass();
-
+
private static final String MODE_STANDARD = "Standard"; // $NON-NLS-1$
private static final String MODE_HOLD = "Hold"; // $NON-NLS-1$
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java Tue Feb 23 16:09:09 2010
@@ -103,7 +103,7 @@
static {
JTLSAVER.setMode(XStream.NO_REFERENCES); // This is needed to stop XStream keeping copies of each class
}
-
+
// The XML header, with placeholder for encoding, since that is controlled by property
private static final String XML_HEADER = "<?xml version=\"1.0\" encoding=\"<ph>\"?>"; // $NON-NLS-1$
@@ -260,7 +260,7 @@
* @param key
* @param jmxsaver
* @param useMapper
- *
+ *
* @throws InstantiationException
* @throws IllegalAccessException
* @throws InvocationTargetException
@@ -276,7 +276,7 @@
new Class[] { Mapper.class }).newInstance(
new Object[] { jmxsaver.getMapper() }));
} else {
- jmxsaver.registerConverter((Converter) Class.forName(key).newInstance());
+ jmxsaver.registerConverter((Converter) Class.forName(key).newInstance());
}
}
@@ -429,7 +429,7 @@
/**
* Read results from JTL file.
- *
+ *
* @param reader of the file
* @param resultCollectorHelper helper class to enable TestResultWrapperConverter to deliver the samples
* @throws Exception
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/BeanInfoSupport.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/BeanInfoSupport.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/BeanInfoSupport.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/BeanInfoSupport.java Tue Feb 23 16:09:09 2010
@@ -82,10 +82,10 @@
// NOTREAD private Class beanClass;
/** The BeanInfo for our class as obtained by the introspector. */
private final BeanInfo rootBeanInfo;
-
+
/** The descriptor for our class */
private final BeanDescriptor beanDescriptor;
-
+
/** The icons for this bean. */
private final Image[] icons = new Image[5];
@@ -105,7 +105,7 @@
// N.B. JVMs other than Sun may return different instances each time
// so we cache the value here (and avoid having to fetch it every time)
beanDescriptor = rootBeanInfo.getBeanDescriptor();
-
+
try {
ResourceBundle resourceBundle = ResourceBundle.getBundle(
beanClass.getName() + "Resources", // $NON-NLS-1$
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/TestBean.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/TestBean.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/TestBean.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/TestBean.java Tue Feb 23 16:09:09 2010
@@ -5,15 +5,15 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
- *
+ *
*/
/*
@@ -23,7 +23,7 @@
/**
* Marker interface to tell JMeter to make a Test Bean Gui for the class.
- *
+ *
*/
public interface TestBean {
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/TestBeanHelper.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/TestBeanHelper.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/TestBeanHelper.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/TestBeanHelper.java Tue Feb 23 16:09:09 2010
@@ -121,7 +121,7 @@
else value = Converter.convert(jprop.getStringValue(), type);
return value;
}
-
+
private static Object unwrapCollection(MultiProperty prop,String type)
{
if(prop instanceof CollectionProperty)
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/ComboStringEditor.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/ComboStringEditor.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/ComboStringEditor.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/ComboStringEditor.java Tue Feb 23 16:09:09 2010
@@ -79,7 +79,7 @@
*/
// TODO - do these behave properly during language change? Probably not.
-
+
// Needs to be visible to test cases
static final Object UNDEFINED = new UniqueObject(JMeterUtils.getResString("property_undefined")); //$NON-NLS-1$
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TableEditor.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TableEditor.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TableEditor.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TableEditor.java Tue Feb 23 16:09:09 2010
@@ -50,11 +50,11 @@
public class TableEditor extends PropertyEditorSupport implements FocusListener,TestBeanPropertyEditor,TableModelListener {
private static final Logger log = LoggingManager.getLoggerForClass();
-
+
public static final String CLASSNAME = "tableObject.classname"; // $NON-NLS-1$
public static final String HEADERS = "table.headers"; // $NON-NLS-1$
public static final String OBJECT_PROPERTIES = "tableObject.properties"; // $NON-NLS-1$
-
+
private JTable table;
private ObjectTableModel model;
private Class<?> clazz;
@@ -82,7 +82,7 @@
pane.validate();
return pane;
}
-
+
private JComponent makePanel()
{
JPanel p = new JPanel(new BorderLayout());
@@ -104,7 +104,7 @@
@Override
public void setAsText(String text) throws IllegalArgumentException {
- //not interested in this method.
+ //not interested in this method.
}
@Override
@@ -116,7 +116,7 @@
else model.clearData();
this.firePropertyChange();
}
-
+
private Collection<Object> convertCollection(Collection<?> values)
{
List<Object> l = new LinkedList<Object>();
@@ -140,8 +140,8 @@
}
/**
- * For the table editor, the tag must simply be the name of the class of object it will hold
- * where each row holds one object.
+ * For the table editor, the tag must simply be the name of the class of object it will hold
+ * where each row holds one object.
*/
public void setDescriptor(PropertyDescriptor descriptor) {
try {
@@ -152,7 +152,7 @@
throw new RuntimeException("The Table Editor requires one TAG be set - the name of the object to represent a row",e);
}
}
-
+
void initializeModel()
{
if(clazz == String.class)
@@ -182,13 +182,13 @@
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
table.addFocusListener(this);
}
-
+
Functor createWriter(Class<?> c,String propName)
{
String setter = "set" + propName; // $NON-NLS-1$
return new Functor(setter);
}
-
+
Functor createReader(Class<?> c,String propName)
{
String getter = "get" + propName; // $NON-NLS-1$
@@ -199,7 +199,7 @@
}
catch(Exception e) { return new Functor("is" + propName); }
}
-
+
Class<?> getArgForWriter(Class<?> c,String propName)
{
String setter = "set" + propName; // $NON-NLS-1$
@@ -214,11 +214,11 @@
}
public void tableChanged(TableModelEvent e) {
- this.firePropertyChange();
+ this.firePropertyChange();
}
public void focusGained(FocusEvent e) {
-
+
}
public void focusLost(FocusEvent e) {
@@ -239,7 +239,7 @@
}
this.firePropertyChange();
}
-
+
private class AddListener implements ActionListener
{
public void actionPerformed(ActionEvent e)
@@ -253,7 +253,7 @@
}
}
}
-
+
private class RemoveListener implements ActionListener
{
public void actionPerformed(ActionEvent e)
@@ -261,7 +261,7 @@
model.removeRow(table.getSelectedRow());
}
}
-
+
private class ClearListener implements ActionListener
{
public void actionPerformed(ActionEvent e)
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TextAreaEditor.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TextAreaEditor.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TextAreaEditor.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TextAreaEditor.java Tue Feb 23 16:09:09 2010
@@ -30,7 +30,7 @@
import javax.swing.JTextArea;
public class TextAreaEditor extends PropertyEditorSupport implements FocusListener {
-
+
private JTextArea textUI;
private JScrollPane scroller;
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/AbstractScopedTestElement.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/AbstractScopedTestElement.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/AbstractScopedTestElement.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/AbstractScopedTestElement.java Tue Feb 23 16:09:09 2010
@@ -13,7 +13,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
*/
package org.apache.jmeter.testelement;
@@ -28,7 +28,7 @@
* Super-class for TestElements that can be applied to main sample, sub-samples or both.
* [Assertions use a different class because they use a different value for the {@link #getScopeName()} constant]
* </p>
- *
+ *
* <p>
* Their corresponding GUI classes need to add the ScopePanel to the GUI
* using the AbstractXXXGui methods:
@@ -67,7 +67,7 @@
/**
* Is the assertion to be applied to the main (parent) sample?
- *
+ *
* @param scope
* @return if the assertion is to be applied to the parent sample.
*/
@@ -77,7 +77,7 @@
/**
* Is the assertion to be applied to the sub-samples (children)?
- *
+ *
* @param scope
* @return if the assertion is to be applied to the children.
*/
@@ -87,7 +87,7 @@
/**
* Is the assertion to be applied to the all samples?
- *
+ *
* @param scope
* @return if the assertion is to be applied to the all samples.
*/
@@ -97,7 +97,7 @@
/**
* Is the assertion to be applied to the all samples?
- *
+ *
* @param scope
* @return if the assertion is to be applied to the all samples.
*/
@@ -107,7 +107,7 @@
/**
* Is the assertion to be applied to the all samples?
- *
+ *
* @return if the assertion is to be applied to the all samples.
*/
protected boolean isScopeVariable() {
@@ -138,13 +138,13 @@
/**
* Generate a list of qualifying sample results,
* depending on the scope.
- *
+ *
* @param result current sample
* @return list containing the current sample and/or its child samples
*/
protected List<SampleResult> getSampleList(SampleResult result) {
List<SampleResult> sampleList = new ArrayList<SampleResult>();
-
+
String scope = fetchScope();
if (isScopeParent(scope) || isScopeAll(scope)) {
sampleList.add(result);
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/VariablesCollection.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/VariablesCollection.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/VariablesCollection.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/VariablesCollection.java Tue Feb 23 16:09:09 2010
@@ -28,9 +28,9 @@
* @version $Revision$
*/
public class VariablesCollection implements Serializable {
-
+
private static final long serialVersionUID = 240L;
-
+
private Map<String, JMeterVariables> varMap = new HashMap<String, JMeterVariables>();
public void addJMeterVariables(JMeterVariables jmVars) {
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java Tue Feb 23 16:09:09 2010
@@ -116,7 +116,7 @@
private volatile boolean onErrorStopTestNow;
private volatile boolean onErrorStopThread;
-
+
private volatile Sampler currentSampler;
public JMeterThread(HashTree test, JMeterThreadMonitor monitor, ListenerNotifier note) {
@@ -277,7 +277,7 @@
*
* @param current sampler
* @param parent sampler
- * @param threadContext
+ * @param threadContext
* @return SampleResult if a transaction was processed
*/
@SuppressWarnings("deprecation") // OK to call TestBeanHelper.prepare()
@@ -436,7 +436,7 @@
}
/**
- * @param threadContext
+ * @param threadContext
*
*/
private void initRun(JMeterContext threadContext) {
@@ -533,7 +533,7 @@
log.warn("Interrupting: " + threadName + " sampler: " +samp.getName());
try {
boolean found = ((Interruptible)samp).interrupt();
- if (!found) {
+ if (!found) {
log.warn("No operation pending");
}
return found;
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java Tue Feb 23 16:09:09 2010
@@ -84,7 +84,7 @@
private JRadioButton stopTestBox;
private JRadioButton stopTestNowBox;
-
+
public ThreadGroupGui() {
super();
init();
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/BSFJavaScriptEngine.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/BSFJavaScriptEngine.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/BSFJavaScriptEngine.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/BSFJavaScriptEngine.java Tue Feb 23 16:09:09 2010
@@ -42,7 +42,7 @@
* <p>
* The original version of this code was first written by Adam Peller
* for use in LotusXSL. Sanjiva took his code and adapted it for BSF.
- *
+ *
* Modified for JMeter to fix bug BSF-22.
*/
public class BSFJavaScriptEngine extends BSFEngineImpl {
@@ -83,18 +83,18 @@
cx.setGeneratingSource(false);
cx.setOptimizationLevel(0);
cx.setDebugger(null, null);
-
+
retval =
((Function) fun).call(cx, global, global, args);
-
+
// ScriptRuntime.call(cx, fun, global, args, global);
if (retval instanceof Wrapper)
retval = ((Wrapper) retval).unwrap();
- }
+ }
catch (Throwable t) {
handleError(t);
- }
+ }
finally {
Context.exit();
}
@@ -108,7 +108,7 @@
(bean.bean instanceof String) ||
(bean.bean instanceof Boolean)) {
global.put(bean.name, global, bean.bean);
- }
+ }
else {
// Must wrap non-scriptable objects before presenting to Rhino
Scriptable wrapped = Context.toObject(bean.bean, global);
@@ -143,10 +143,10 @@
if (retval instanceof NativeJavaObject)
retval = ((NativeJavaObject) retval).unwrap();
- }
+ }
catch (Throwable t) { // includes JavaScriptException, rethrows Errors
handleError(t);
- }
+ }
finally {
Context.exit();
}
@@ -200,16 +200,16 @@
}
/**
- * Initialize the engine.
+ * Initialize the engine.
* Put the manager into the context-manager
* map hashtable too.
*/
@Override
- public void initialize(BSFManager mgr, String lang,
+ public void initialize(BSFManager mgr, String lang,
@SuppressWarnings("unchecked") // superclass does not support types
Vector declaredBeans)
throws BSFException {
-
+
super.initialize(mgr, lang, declaredBeans);
// Initialize context and global scope object
@@ -221,14 +221,14 @@
for(
@SuppressWarnings("unchecked")
- Iterator<BSFDeclaredBean> it = declaredBeans.iterator();
+ Iterator<BSFDeclaredBean> it = declaredBeans.iterator();
it.hasNext();) {
declareBean(it.next());
}
- }
+ }
catch (Throwable t) {
- }
+ }
finally {
Context.exit();
}
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/BSFTestElement.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/BSFTestElement.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/BSFTestElement.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/BSFTestElement.java Tue Feb 23 16:09:09 2010
@@ -42,7 +42,7 @@
implements Serializable, Cloneable
{
private static final long serialVersionUID = 233L;
-
+
private static final Logger log = LoggingManager.getLoggerForClass();
static {
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellClient.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellClient.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellClient.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellClient.java Tue Feb 23 16:09:09 2010
@@ -13,7 +13,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
*/
package org.apache.jmeter.util;
@@ -30,7 +30,7 @@
* Implements a client that can talk to the JMeter BeanShell server.
*/
public class BeanShellClient {
-
+
private static final int MINARGS = 3;
public static void main(String [] args) throws Exception{
@@ -44,22 +44,22 @@
String host=args[0];
String portString = args[1];
String file=args[2];
-
+
int port=Integer.parseInt(portString)+1;// convert to telnet port
System.out.println("Connecting to BSH server on "+host+":"+portString);
-
+
Socket sock = new Socket(host,port);
InputStream is = sock.getInputStream();
-
+
OutputStream os = sock.getOutputStream();
-
+
InputStreamReader fis = new FileReader(file);
-
+
new SockRead(is).start();
-
+
sendLine("bsh.prompt=\"\";",os);// Prompt is unnecessary
-
+
sendLine("String [] args={",os);
for (int i=MINARGS; i<args.length;i++){
sendLine("\""+args[i]+"\",\n",os);
@@ -73,7 +73,7 @@
sendLine("bsh.prompt=\"bsh % \";",os);// Reset for other users
os.flush();
sock.shutdownOutput(); // Tell server that we are done
- }
+ }
private static void sendLine( String line, OutputStream outPipe )
throws IOException
@@ -85,12 +85,12 @@
private static class SockRead extends Thread {
private final InputStream is;
-
+
public SockRead(InputStream _is) {
this.is=_is;
//this.setDaemon(true);
}
-
+
@Override
public void run(){
System.out.println("Reading responses from server ...");
@@ -108,7 +108,7 @@
} catch (IOException e) {
}
}
-
+
}
}
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java Tue Feb 23 16:09:09 2010
@@ -92,7 +92,7 @@
private static String localHostName = null;
//@GuardedBy("this")
private static String localHostFullName = null;
-
+
private static volatile boolean ignoreResorces = false; // Special flag for use in debugging resources
private static final ThreadLocal<Perl5Matcher> localMatcher = new ThreadLocal<Perl5Matcher>() {
@@ -459,7 +459,7 @@
* Get the locale name as a resource.
* Does not log an error if the resource does not exist.
* This is needed to support additional locales, as they won't be in existing messages files.
- *
+ *
* @param locale name
* @return the locale display name as defined in the current Locale or the original string if not present
*/
@@ -1144,9 +1144,9 @@
}
/**
- * Returns the cached result from calling
+ * Returns the cached result from calling
* InetAddress.getLocalHost().getHostAddress()
- *
+ *
* @return String representation of local IP address
*/
public static synchronized String getLocalHostIP(){
@@ -1157,9 +1157,9 @@
}
/**
- * Returns the cached result from calling
+ * Returns the cached result from calling
* InetAddress.getLocalHost().getHostName()
- *
+ *
* @return local host name
*/
public static synchronized String getLocalHostName(){
@@ -1170,9 +1170,9 @@
}
/**
- * Returns the cached result from calling
+ * Returns the cached result from calling
* InetAddress.getLocalHost().getCanonicalHostName()
- *
+ *
* @return local host name in canonical form
*/
public static synchronized String getLocalHostFullName(){
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/JSR223TestElement.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/JSR223TestElement.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/JSR223TestElement.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/JSR223TestElement.java Tue Feb 23 16:09:09 2010
@@ -44,7 +44,7 @@
implements Serializable, Cloneable
{
private static final long serialVersionUID = 233L;
-
+
private static final Logger log = LoggingManager.getLoggerForClass();
//++ For TestBean implementations only
@@ -93,7 +93,7 @@
final String scriptParameters = getParameters();
// Use actual class name for log
final Logger logger = LoggingManager.getLoggerForShortName(getClass().getName());
-
+
sem.put("log", logger);
sem.put("Label", label);
sem.put("FileName", fileName);
@@ -117,16 +117,16 @@
sem.put("prev", prev);
}
-
+
protected Object processFileOrScript(ScriptEngineManager sem) throws IOException, ScriptException {
-
+
final String lang = getScriptLanguage();
ScriptEngine scriptEngine = sem.getEngineByName(lang);
if (scriptEngine == null) {
log.error("Unsupported scripting engine: "+lang);
return null;
}
-
+
File scriptFile = new File(getFilename());
if (scriptFile.exists()) {
BufferedReader fileReader = null;
@@ -139,7 +139,7 @@
} else {
return scriptEngine.eval(getScript());
}
-
+
}
/**
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/NameUpdater.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/NameUpdater.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/NameUpdater.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/NameUpdater.java Tue Feb 23 16:09:09 2010
@@ -34,7 +34,7 @@
public final class NameUpdater {
private static final Properties nameMap;
// Read-only access after class has been initialised
-
+
private static final Logger log = LoggingManager.getLoggerForClass();
static {
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/ScopePanel.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/ScopePanel.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/ScopePanel.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/ScopePanel.java Tue Feb 23 16:09:09 2010
@@ -34,7 +34,7 @@
/**
* Scope panel so users can choose whether
* to apply the test element to the parent sample, the child samples or both.
- *
+ *
*/
public class ScopePanel extends JPanel implements ActionListener {
@@ -72,7 +72,7 @@
setBorder(BorderFactory.createTitledBorder(JMeterUtils.getResString("sample_scope"))); //$NON-NLS-1$
parentButton.setSelected(true);
-
+
JPanel buttonPanel = new HorizontalPanel();
ButtonGroup group = new ButtonGroup();
group.add(allButton);
@@ -93,7 +93,7 @@
public void clearGui() {
parentButton.setSelected(true);
}
-
+
public int getSelection(){
if (parentButton.isSelected()){
return 0;
@@ -106,7 +106,7 @@
}
public void setScopeChildren() {
- childButton.setSelected(true);
+ childButton.setSelected(true);
}
public void setScopeParent() {
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/ShutdownClient.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/ShutdownClient.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/ShutdownClient.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/ShutdownClient.java Tue Feb 23 16:09:09 2010
@@ -13,7 +13,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
*/
package org.apache.jmeter.util;
@@ -41,7 +41,7 @@
byte[] buf = command.getBytes("ASCII");
InetAddress address = InetAddress.getByName("localhost");
DatagramPacket packet = new DatagramPacket(buf, buf.length, address, port);
- socket.send(packet);
+ socket.send(packet);
socket.close();
}
}
Modified: jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/CharFunction.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/CharFunction.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/CharFunction.java (original)
+++ jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/CharFunction.java Tue Feb 23 16:09:09 2010
@@ -13,7 +13,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
*/
package org.apache.jmeter.functions;
@@ -36,7 +36,7 @@
public class CharFunction extends AbstractFunction {
private static final Logger log = LoggingManager.getLoggerForClass();
-
+
private static final List<String> desc = new LinkedList<String>();
private static final String KEY = "__char"; //$NON-NLS-1$
Modified: jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/FileToString.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/FileToString.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/FileToString.java (original)
+++ jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/FileToString.java Tue Feb 23 16:09:09 2010
@@ -68,7 +68,7 @@
private static final int MAX_PARAM_COUNT = 3;
private static final int ENCODING = 2;
-
+
private static final int PARAM_NAME = 3;
private Object[] values;
@@ -82,7 +82,7 @@
throws InvalidVariableException {
String fileName = ((CompoundVariable) values[0]).execute();
-
+
String encoding = null;//means platform default
if (values.length >= ENCODING) {
encoding = ((CompoundVariable) values[ENCODING - 1]).execute().trim();
@@ -94,14 +94,14 @@
}
String myValue = ERR_IND;
-
+
try {
myValue = FileUtils.readFileToString(new File(fileName), encoding);
} catch (IOException e) {
log.warn("Could not read file: "+fileName+" "+e.getMessage());
throw new JMeterStopThreadException("End of sequence");
}
-
+
if (myName.length() > 0) {
JMeterVariables vars = getVariables();
if (vars != null) {// Can be null if called from Config item testEnded() method
@@ -114,7 +114,7 @@
log.debug(tn + " name:" //$NON-NLS-1$
+ myName + " value:" + myValue);//$NON-NLS-1$
}
-
+
return myValue;
}
Modified: jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/MachineName.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/MachineName.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/MachineName.java (original)
+++ jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/MachineName.java Tue Feb 23 16:09:09 2010
@@ -13,7 +13,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
*/
package org.apache.jmeter.functions;
@@ -55,7 +55,7 @@
*/
String machineName = JMeterUtils.getLocalHostName();
-
+
if (values.length >= 1){// we have a variable name
JMeterVariables vars = getVariables();
if (vars != null) {// May be null if function is used on TestPlan
Modified: jakarta/jmeter/trunk/src/jorphan/org/apache/commons/jexl/bsf/JexlEngine.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/commons/jexl/bsf/JexlEngine.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/jorphan/org/apache/commons/jexl/bsf/JexlEngine.java (original)
+++ jakarta/jmeter/trunk/src/jorphan/org/apache/commons/jexl/bsf/JexlEngine.java Tue Feb 23 16:09:09 2010
@@ -41,13 +41,13 @@
public class JexlEngine extends BSFEngineImpl {
// private static final Logger log = LoggingManager.getLoggerForClass();
-
+
private JexlContext jc;
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override
- public void initialize(BSFManager mgr, String lang,
+ public void initialize(BSFManager mgr, String lang,
Vector declaredBeans)
throws BSFException {
super.initialize(mgr, lang, declaredBeans);
Modified: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/collections/HashTree.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/collections/HashTree.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/collections/HashTree.java (original)
+++ jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/collections/HashTree.java Tue Feb 23 16:09:09 2010
@@ -55,7 +55,7 @@
// causes a Security violation in RemoteJMeterImpl
// so we use getLoggerFor() instead
// private static final Logger log = LoggingManager.getLoggerFor(HashTree.class.getName());
-
+
// Used for the RuntimeException to short-circuit the traversal
private static final String FOUND = "found"; // $NON-NLS-1$
@@ -994,7 +994,7 @@
/**
* Generate a printable representation of the tree.
- *
+ *
* @return a representation of the tree
*/
@Override
Modified: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java (original)
+++ jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java Tue Feb 23 16:09:09 2010
@@ -29,10 +29,10 @@
/**
* This class serves as a way to calculate the median, max, min etc. of a list of values.
* It is not threadsafe.
- *
+ *
*/
public abstract class StatCalculator<T extends Number & Comparable<? super T>> {
-
+
// key is the type to collect (usually long), value = count of entries
private final TreeMap<T, MutableLong> valuesMap = new TreeMap<T, MutableLong>();
// We use a TreeMap because we need the entries to be sorted
@@ -55,11 +55,11 @@
private long bytes = 0;
private final T ZERO;
-
+
private final T MAX_VALUE; // e.g. Long.MAX_VALUE
-
+
private final T MIN_VALUE; // e.g. Long.MIN_VALUE
-
+
/**
* This constructor is used to set up particular values for the generic class instance.
*
@@ -137,7 +137,7 @@
return getMax();
}
- // use Math.round () instead of simple (long) to provide correct value rounding
+ // use Math.round () instead of simple (long) to provide correct value rounding
long target = Math.round (count * percent);
try {
for (Entry<T, MutableLong> val : valuesMap.entrySet()) {
@@ -154,7 +154,7 @@
/**
* Returns the distribution of the values in the list.
- *
+ *
* @return map containing either Integer or Long keys; entries are a Number array containing the key and the [Integer] count.
* TODO - why is the key value also stored in the entry array?
*/
Modified: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java (original)
+++ jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java Tue Feb 23 16:09:09 2010
@@ -110,14 +110,14 @@
return false;
}
}
-
+
private static class AnnoFilterTreeSet extends TreeSet<String>{
private static final long serialVersionUID = 240L;
private final boolean inner; // are inner classes OK?
private final Class<? extends Annotation>[] annotations; // annotation classes to check
- private final transient ClassLoader contextClassLoader
+ private final transient ClassLoader contextClassLoader
= Thread.currentThread().getContextClassLoader(); // Potentially expensive; do it once
AnnoFilterTreeSet(Class<? extends Annotation> []annotations, boolean inner){
super();
@@ -213,7 +213,7 @@
throws IOException {
return findClassesThatExtend(strPathsOrJars, superClasses, innerClasses, contains, notContains, false);
}
-
+
/**
* Find classes in the provided path(s)/jar(s) that extend the class(es).
* @param strPathsOrJars - pathnames or jarfiles to search for classes
@@ -227,11 +227,11 @@
throws IOException {
return findClassesThatExtend(strPathsOrJars, annotations, innerClasses, null, null, true);
}
-
+
/**
* Find classes in the provided path(s)/jar(s) that extend the class(es).
* Inner classes are not searched.
- *
+ *
* @param strPathsOrJars - pathnames or jarfiles to search for classes
* @param annotations - required annotations
*
@@ -242,7 +242,7 @@
throws IOException {
return findClassesThatExtend(strPathsOrJars, annotations, false, null, null, true);
}
-
+
/**
* Find classes in the provided path(s)/jar(s) that extend the class(es).
* @param strPathsOrJars - pathnames or jarfiles to search for classes
@@ -483,7 +483,7 @@
}
return false;
}
-
+
private static boolean hasAnnotationOnMethod(Class<? extends Annotation>[] annotations, String classInQuestion,
ClassLoader contextClassLoader ){
try{
Modified: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/HeapDumper.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/HeapDumper.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/HeapDumper.java (original)
+++ jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/HeapDumper.java Tue Feb 23 16:09:09 2010
@@ -13,7 +13,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
*/
package org.apache.jorphan.util;
@@ -37,7 +37,7 @@
* The code will only work on Sun Java 1.6+.
*/
public class HeapDumper {
-
+
// SingletonHolder idiom for lazy initialisation
private static class DumperHolder {
private static final HeapDumper DUMPER = new HeapDumper();
@@ -46,18 +46,18 @@
private static HeapDumper getInstance(){
return DumperHolder.DUMPER;
}
-
+
// This is the name of the HotSpot Diagnostic platform MBean (Sun Java 1.6)
// See: http://java.sun.com/javase/6/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticMXBean.html
private static final String HOTSPOT_BEAN_NAME =
"com.sun.management:type=HotSpotDiagnostic";
private static final SimpleDateFormat TIME_STAMP_FORMAT = new SimpleDateFormat("yyyyMMdd_hhmmss_SSS");
-
+
// These are needed for invoking the method
private final MBeanServer server;
private final ObjectName hotspotDiagnosticBean;
-
+
// If we could not find the method, store the exception here
private final Exception exception;
@@ -78,11 +78,11 @@
exception = ex;
hotspotDiagnosticBean = on;
}
-
+
/**
* Initialise the dumper, and report if there is a problem.
* This is optional, as the dump methods will initialise if necessary.
- *
+ *
* @throws Exception if there is a problem finding the heapDump MXBean
*/
public static void init() throws Exception {
@@ -91,19 +91,19 @@
throw e;
}
}
-
+
/**
* Dumps the heap to the outputFile file in the same format as the hprof heap dump.
* <p>
* Calls the dumpHeap() method of the HotSpotDiagnostic MXBean, if available.
* <p>
- * See
+ * See
* <a href="http://java.sun.com/javase/6/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticMXBean.html">
* HotSpotDiagnosticMXBean
* </a>
* @param fileName name of the heap dump file. Must be creatable, i.e. must not exist.
* @param live if true, dump only the live objects
- * @throws Exception if the MXBean cannot be found, or if there is a problem during invocation
+ * @throws Exception if the MXBean cannot be found, or if there is a problem during invocation
*/
public static void dumpHeap(String fileName, boolean live) throws Exception{
getInstance().dumpHeap0(fileName, live);
@@ -114,7 +114,7 @@
* <p>
* @see #dumpHeap(String, boolean)
* @param fileName name of the heap dump file. Must be creatable, i.e. must not exist.
- * @throws Exception if the MXBean cannot be found, or if there is a problem during invocation
+ * @throws Exception if the MXBean cannot be found, or if there is a problem during invocation
*/
public static void dumpHeap(String fileName) throws Exception{
dumpHeap(fileName, true);
@@ -129,7 +129,7 @@
* @see #dumpHeap(boolean)
* @return the name of the dump file that was created
* @throws IOException
- * @throws Exception if the MXBean cannot be found, or if there is a problem during invocation
+ * @throws Exception if the MXBean cannot be found, or if there is a problem during invocation
*/
public static String dumpHeap() throws Exception{
return dumpHeap(true);
@@ -143,14 +143,14 @@
* <p>
* @see #dumpHeap(String, boolean)
* @param live true id only live objects are to be dumped.
- *
+ *
* @return the name of the dump file that was created
* @throws IOException
- * @throws Exception if the MXBean cannot be found, or if there is a problem during invocation
+ * @throws Exception if the MXBean cannot be found, or if there is a problem during invocation
*/
public static String dumpHeap(boolean live) throws Exception {
return dumpHeap(new File("."), live);
- }
+ }
/**
* Dumps objects from the heap to the outputFile file in the same format as the hprof heap dump.
@@ -161,10 +161,10 @@
* @see #dumpHeap(String, boolean)
* @param basedir File object for the target base directory.
* @param live true id only live objects are to be dumped.
- *
+ *
* @return the name of the dump file that was created
* @throws IOException
- * @throws Exception if the MXBean cannot be found, or if there is a problem during invocation
+ * @throws Exception if the MXBean cannot be found, or if there is a problem during invocation
*/
public static String dumpHeap(File basedir, boolean live) throws Exception {
String stamp = TIME_STAMP_FORMAT.format(new Date());
@@ -176,17 +176,17 @@
/**
* Perform the dump using the dumpHeap method.
- *
+ *
* @param fileName the file to use
* @param live true to dump only live objects
- * @throws Exception if the MXBean cannot be found, or if there is a problem during invocation
+ * @throws Exception if the MXBean cannot be found, or if there is a problem during invocation
*/
private void dumpHeap0(String fileName, boolean live) throws Exception {
try {
if (exception == null) {
- server.invoke(hotspotDiagnosticBean,
- "dumpHeap",
- new Object[]{fileName, Boolean.valueOf(live)},
+ server.invoke(hotspotDiagnosticBean,
+ "dumpHeap",
+ new Object[]{fileName, Boolean.valueOf(live)},
new String[]{"java.lang.String", "boolean"});
} else {
throw exception;
Modified: jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java (original)
+++ jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java Tue Feb 23 16:09:09 2010
@@ -411,7 +411,7 @@
*/
public void itemStateChanged(ItemEvent event) {
if (event.getItem() == junit4){
- setupClasslist();
+ setupClasslist();
}
}
Modified: jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/sampler/JUnitSampler.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/sampler/JUnitSampler.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/sampler/JUnitSampler.java (original)
+++ jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/sampler/JUnitSampler.java Tue Feb 23 16:09:09 2010
@@ -104,9 +104,9 @@
setUpMethod = null;
tearDownMethod = null;
if (!getDoNotSetUpTearDown()) {
- setUpMethod = getJunit4() ?
- getMethodWithAnnotation(testObject, Before.class)
- :
+ setUpMethod = getJunit4() ?
+ getMethodWithAnnotation(testObject, Before.class)
+ :
getMethod(testObject, SETUP);
tearDownMethod = getJunit4() ?
getMethodWithAnnotation(testObject, After.class)
@@ -310,7 +310,7 @@
/**
* Set whether to append errors or not.
- *
+ *
* @param error the setting to apply
*/
public void setAppendError(boolean error) {
@@ -328,7 +328,7 @@
/**
* Set whether to append exceptions or not.
- *
+ *
* @param exc the setting to apply.
*/
public void setAppendException(boolean exc) {
@@ -338,7 +338,7 @@
/**
* Check if JUnit4 (annotations) are to be used instead of
* the JUnit3 style (TestClass and specific method names)
- *
+ *
* @return true if JUnit4 (annotations) are to be used.
* Default is false.
*/
@@ -395,9 +395,9 @@
afe.setStackTrace(cause.getStackTrace());
tr.addFailure(theClazz, afe);
} else if (cause != null) {
- tr.addError(theClazz, cause);
+ tr.addError(theClazz, cause);
} else {
- tr.addError(theClazz, e);
+ tr.addError(theClazz, e);
}
} catch (IllegalAccessException e) {
tr.addError(theClazz, e);
@@ -414,7 +414,7 @@
if (en.hasMoreElements()){
sresult.setResponseCode(getFailureCode());
buf.append( getFailure() );
- buf.append("\n");
+ buf.append("\n");
}
while (en.hasMoreElements()){
TestFailure item = en.nextElement();
@@ -431,7 +431,7 @@
if (en.hasMoreElements()){
sresult.setResponseCode(getErrorCode());
buf.append( getError() );
- buf.append("\n");
+ buf.append("\n");
}
while (en.hasMoreElements()){
TestFailure item = en.nextElement();
@@ -545,7 +545,7 @@
}
return null;
}
-
+
private Method getMethodWithAnnotation(Object clazz, Class<? extends Annotation> annotation) {
if(null != clazz && null != annotation) {
for(Method m : clazz.getClass().getMethods()) {
@@ -556,10 +556,10 @@
}
return null;
}
-
+
/*
* Wrapper to convert a JUnit4 class into a TestCase
- *
+ *
* TODO - work out how to convert JUnit4 assertions so they are treated as failures rather than errors
*/
private class AnnotatedTestCase extends TestCase {
@@ -571,7 +571,7 @@
this.expectedException = expectedException2;
this.timeout = timeout;
}
-
+
@Override
protected void runTest() throws Throwable {
try {
@@ -601,7 +601,7 @@
afe.setStackTrace(thrown.getStackTrace());
throw afe;
}
- throw thrown;
+ throw thrown;
}
if (!expectedException.isAssignableFrom(thrown.getClass())){
throw new AssertionFailedError("The wrong exception was thrown from the test case");
Modified: jakarta/jmeter/trunk/src/junit/test/AfterAnnotatedTest.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/test/AfterAnnotatedTest.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/junit/test/AfterAnnotatedTest.java (original)
+++ jakarta/jmeter/trunk/src/junit/test/AfterAnnotatedTest.java Tue Feb 23 16:09:09 2010
@@ -13,7 +13,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
*/
package test;
@@ -31,7 +31,7 @@
public void afterFail(){
fail("afterFail()");
}
-
+
@Test
public void afterTest(){
// Dummy to ensure there is a test to run
Modified: jakarta/jmeter/trunk/src/junit/test/BeforeAnnotatedTest.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/test/BeforeAnnotatedTest.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/junit/test/BeforeAnnotatedTest.java (original)
+++ jakarta/jmeter/trunk/src/junit/test/BeforeAnnotatedTest.java Tue Feb 23 16:09:09 2010
@@ -13,7 +13,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
*/
package test;
@@ -31,7 +31,7 @@
public void beginFail(){
fail("beginFail()");
}
-
+
@Test
public void beginTest(){
// Dummy to ensure there is a test to run
Modified: jakarta/jmeter/trunk/src/junit/test/DummyAnnotatedTest.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/test/DummyAnnotatedTest.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/junit/test/DummyAnnotatedTest.java (original)
+++ jakarta/jmeter/trunk/src/junit/test/DummyAnnotatedTest.java Tue Feb 23 16:09:09 2010
@@ -27,12 +27,12 @@
/**
* Sample test cases for demonstrating JUnit4 sampler.
- *
+ *
*/
public class DummyAnnotatedTest
{
public int two = 1; //very wrong.
-
+
public DummyAnnotatedTest() {
}
@@ -41,23 +41,23 @@
public void expectedExceptionPass() {
throw new RuntimeException();
}
-
+
// Fails to generate expected Exception
@Test(expected=RuntimeException.class)
public void expectedExceptionFail() {
}
-
+
@Before
public void verifyTwo() {
System.out.println("DummyAnnotatedTest#verifyTwo()");
two = 2;
}
-
+
@After
public void printDone() {
System.out.println("DummyAnnotatedTest#printDone()");
}
-
+
@Test
// Succeeds only if Before method - verifyTwo() - is run.
public void add() {
@@ -68,7 +68,7 @@
//or if you have assertions enabled
assert 4 == four;
}
-
+
//should always fail
@Test(timeout=1000)
public void timeOutFail() {
@@ -84,19 +84,19 @@
Thread.sleep(500);
}catch (InterruptedException e) { }
}
-
+
@Test
public void alwaysFail() {
fail("This always fails");
}
-
+
@Test
// Generate a test error
public void divideByZero() {
@SuppressWarnings("unused")
int i = 27 / 0; // will generate Divide by zero error
}
-
+
@Test
public void stringCompareFail(){
assertEquals("this","that");
Modified: jakarta/jmeter/trunk/src/junit/test/SetupTestError.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/test/SetupTestError.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/junit/test/SetupTestError.java (original)
+++ jakarta/jmeter/trunk/src/junit/test/SetupTestError.java Tue Feb 23 16:09:09 2010
@@ -13,7 +13,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
*/
package test;
@@ -33,7 +33,7 @@
public void setUp(){
throw new Error("setUp()");
}
-
+
@Test
public void testSetUpError(){
// Dummy to ensure there is a test to run
Modified: jakarta/jmeter/trunk/src/junit/test/SetupTestFail.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/test/SetupTestFail.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/junit/test/SetupTestFail.java (original)
+++ jakarta/jmeter/trunk/src/junit/test/SetupTestFail.java Tue Feb 23 16:09:09 2010
@@ -13,7 +13,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
*/
package test;
@@ -33,7 +33,7 @@
public void setUp(){
fail("setUp()");
}
-
+
@Test
public void testSetUpFail(){
// Dummy to ensure there is a test to run
Modified: jakarta/jmeter/trunk/src/junit/test/TearDownTestFail.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/test/TearDownTestFail.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/junit/test/TearDownTestFail.java (original)
+++ jakarta/jmeter/trunk/src/junit/test/TearDownTestFail.java Tue Feb 23 16:09:09 2010
@@ -13,7 +13,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
*/
package test;
@@ -29,7 +29,7 @@
public void tearDown(){
fail("tearDown()");
}
-
+
public void testTearDownFail(){
// Dummy to ensure there is a test to run
}
Modified: jakarta/jmeter/trunk/src/junit/woolfel/DummyTestCase.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/woolfel/DummyTestCase.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/junit/woolfel/DummyTestCase.java (original)
+++ jakarta/jmeter/trunk/src/junit/woolfel/DummyTestCase.java Tue Feb 23 16:09:09 2010
@@ -36,12 +36,12 @@
public void setUp(){
System.out.println("DummyTestCase#setup(): "+getName());
}
-
+
@Override
public void tearDown(){
System.out.println("DummyTestCase#tearDown(): "+getName());
}
-
+
public void testMethodPass() {
try {
Thread.sleep(100);
@@ -50,7 +50,7 @@
e.printStackTrace();
}
}
-
+
public void testMethodPass2() {
try {
Thread.sleep(100);
@@ -68,7 +68,7 @@
e.printStackTrace();
}
}
-
+
public void testMethodFail2() {
try {
Thread.sleep(100);
@@ -77,12 +77,12 @@
e.printStackTrace();
}
}
-
+
// Normal test failure
public void testFail() {
fail("Test failure");
}
-
+
// Generate test error
public void testException() {
@SuppressWarnings("unused")
Modified: jakarta/jmeter/trunk/src/junit/woolfel/SubDummyTest.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/woolfel/SubDummyTest.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/junit/woolfel/SubDummyTest.java (original)
+++ jakarta/jmeter/trunk/src/junit/woolfel/SubDummyTest.java Tue Feb 23 16:09:09 2010
@@ -33,7 +33,7 @@
public void oneTimeSetUp() {
System.out.println("SubDummyTest#oneTimeSetUp(): "+getName());
}
-
+
public void oneTimeTearDown() {
System.out.println("SubDummyTest#oneTimeTearDown(): "+getName());
}
Modified: jakarta/jmeter/trunk/src/junit/woolfel/SubDummyTest2.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/woolfel/SubDummyTest2.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/junit/woolfel/SubDummyTest2.java (original)
+++ jakarta/jmeter/trunk/src/junit/woolfel/SubDummyTest2.java Tue Feb 23 16:09:09 2010
@@ -34,7 +34,7 @@
public void oneTimeSetUp() {
System.out.println("SubDummyTest2#oneTimeSetUp(): "+getName());
}
-
+
public void oneTimeTearDown() {
System.out.println("SubDummyTest2#oneTimeTearDown(): "+getName());
}
Modified: jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/monitor/util/Stats.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/monitor/util/Stats.java?rev=915405&r1=915404&r2=915405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/monitor/util/Stats.java (original)
+++ jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/monitor/util/Stats.java Tue Feb 23 16:09:09 2010
@@ -164,10 +164,10 @@
}
return load;
}
-
+
/**
* Method to get connector to use for calculate server status
- *
+ *
* @param stat
* @return connector
*/
@@ -181,7 +181,7 @@
if (cntr.getName().startsWith(connectorPrefix)) {
return cntr;
}
- }
+ }
}
// default : get first connector
cntr = stat.getConnector().get(0);
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org