jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1649516 - in /jmeter/trunk: src/components/org/apache/jmeter/timers/ src/core/org/apache/jmeter/control/ src/core/org/apache/jmeter/save/converters/ src/core/org/apache/jmeter/util/ src/core/org/apache/jmeter/visualizers/gui/ src/protocol/...
Date Mon, 05 Jan 2015 12:33:41 GMT
Author: fschumacher
Date: Mon Jan  5 12:33:41 2015
New Revision: 1649516

URL: http://svn.apache.org/r1649516
Log:
Bug 57193: Add param and return tags to javadoc
Bugzilla Id: 57193

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimer.java
    jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java
    jmeter/trunk/src/core/org/apache/jmeter/save/converters/SampleResultConverter.java
    jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellTestElement.java
    jmeter/trunk/src/core/org/apache/jmeter/visualizers/gui/AbstractVisualizer.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/Filter.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogParser.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/SharedTCLogParser.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.java
    jmeter/trunk/src/reports/org/apache/jmeter/testelement/BarChart.java
    jmeter/trunk/test/src/org/apache/jorphan/test/AllTests.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimer.java?rev=1649516&r1=1649515&r2=1649516&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimer.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimer.java Mon
Jan  5 12:33:41 2015
@@ -158,7 +158,11 @@ public class ConstantThroughputTimer ext
     }
 
     /**
+     * Calculate the target time by adding the result of private method
+     * <code>calculateDelay()</code> to the given <code>currentTime</code>
+     * 
      * @param currentTime
+     *            time in ms
      * @return new Target time
      */
     // TODO - is this used? (apart from test code)

Modified: jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java?rev=1649516&r1=1649515&r2=1649516&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java Mon Jan  5 12:33:41
2015
@@ -137,25 +137,25 @@ public class GenericController extends A
      * </p>
      *
      * <p>
-     * If isDone, returns null.
+     * If {@link #isDone()} is <code>true</code>, returns null.
      * </p>
      *
      * <p>
      * Gets the list element using current pointer.
-     * If this is null, calls {@link #nextIsNull()}.
+     * If this is <code>null</code>, calls {@link #nextIsNull()}.
      * </p>
      *
      * <p>
-     * If the list element is a sampler, calls {@link #nextIsASampler(Sampler)},
+     * If the list element is a {@link Sampler}, calls {@link #nextIsASampler(Sampler)},
      * otherwise calls {@link #nextIsAController(Controller)}
      * </p>
      *
      * <p>
-     * If any of the called methods throws NextIsNullException, returns null,
+     * If any of the called methods throws {@link NextIsNullException}, returns <code>null</code>,
      * otherwise the value obtained above is returned.
      * </p>
      *
-     * @return the next sampler or null
+     * @return the next sampler or <code>null</code>
      */
     @Override
     public Sampler next() {
@@ -214,12 +214,13 @@ public class GenericController extends A
     }
 
     /**
-     * Called by next() if the element is a Controller,
-     * and returns the next sampler from the controller.
-     * If this is null, then updates the current pointer and makes recursive call to next().
-     * @param controller
+     * Called by {@link #next()} if the element is a Controller, and returns the
+     * next sampler from the controller. If this is <code>null</code>, then
+     * updates the current pointer and makes recursive call to {@link #next()}.
+     * 
+     * @param controller the current <em>next</em> element
      * @return the next sampler
-     * @throws NextIsNullException
+     * @throws NextIsNullException when the end of the list has already been reached
      */
     protected Sampler nextIsAController(Controller controller) throws NextIsNullException
{
         Sampler sampler = controller.next();
@@ -231,13 +232,14 @@ public class GenericController extends A
     }
 
     /**
-     * Increment the current pointer and return the element.
-     * Called by next() if the element is a sampler.
-     * (May be overriden by sub-classes).
+     * Increment the current pointer and return the element. Called by
+     * {@link #next()} if the element is a sampler. (May be overriden by
+     * sub-classes).
      *
      * @param element
+     *            the current <em>next</em> element
      * @return input element
-     * @throws NextIsNullException
+     * @throws NextIsNullException when the end of the list has already been reached
      */
     protected Sampler nextIsASampler(Sampler element) throws NextIsNullException {
         incrementCurrent();
@@ -245,11 +247,11 @@ public class GenericController extends A
     }
 
     /**
-     * Called by next() when getCurrentElement() returns null.
+     * Called by {@link #next()} when {@link #getCurrentElement()} returns <code>null</code>.
      * Reinitialises the controller.
      *
      * @return null (always, for this class)
-     * @throws NextIsNullException
+     * @throws NextIsNullException when the end of the list has already been reached
      */
     protected Sampler nextIsNull() throws NextIsNullException {
         reInitialize();
@@ -303,7 +305,9 @@ public class GenericController extends A
      * Empty implementation - does nothing.
      *
      * @param currentElement
+     *            the current element
      * @throws NextIsNullException
+     *             when the list has been completed already
      */
     protected void setCurrentElement(TestElement currentElement) throws NextIsNullException
{
     }

Modified: jmeter/trunk/src/core/org/apache/jmeter/save/converters/SampleResultConverter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/save/converters/SampleResultConverter.java?rev=1649516&r1=1649515&r2=1649516&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/save/converters/SampleResultConverter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/save/converters/SampleResultConverter.java Mon
Jan  5 12:33:41 2015
@@ -126,9 +126,16 @@ public class SampleResultConverter exten
     }
 
     /**
+     * Save the data of the sample result to a stream
+     *
      * @param writer
+     *            stream to save objects into
+     * @param context
+     *            context for xstream to allow nested objects
      * @param res
+     *            sample to be saved
      * @param save
+     *            configuration telling us what to save
      */
     protected void saveSamplerData(HierarchicalStreamWriter writer, MarshallingContext context,
SampleResult res,
             SampleSaveConfiguration save) {
@@ -144,9 +151,16 @@ public class SampleResultConverter exten
     }
 
     /**
+     * Save the response from the sample result into the stream
+     *
      * @param writer
+     *            stream to save objects into
+     * @param context
+     *            context for xstream to allow nested objects
      * @param res
+     *            sample to be saved
      * @param save
+     *            configuration telling us what to save
      */
     protected void saveResponseData(HierarchicalStreamWriter writer, MarshallingContext context,
SampleResult res,
             SampleSaveConfiguration save) {
@@ -172,9 +186,16 @@ public class SampleResultConverter exten
     }
 
     /**
+     * Save request headers from the sample result into the stream
+     *
      * @param writer
+     *            stream to save objects into
+     * @param context
+     *            context for xstream to allow nested objects
      * @param res
+     *            sample to be saved
      * @param save
+     *            configuration telling us what to save
      */
     protected void saveRequestHeaders(HierarchicalStreamWriter writer, MarshallingContext
context, SampleResult res,
             SampleSaveConfiguration save) {
@@ -184,9 +205,16 @@ public class SampleResultConverter exten
     }
 
     /**
+     * Save response headers from sample result into the stream
+     *
      * @param writer
+     *            stream to save objects into
+     * @param context
+     *            context for xstream to allow nested objects
      * @param res
+     *            sample to be saved
      * @param save
+     *            configuration telling us what to save
      */
     protected void saveResponseHeaders(HierarchicalStreamWriter writer, MarshallingContext
context, SampleResult res,
             SampleSaveConfiguration save) {
@@ -196,10 +224,16 @@ public class SampleResultConverter exten
     }
 
     /**
+     * Save sub results from sample result into the stream
+     *
      * @param writer
+     *            stream to save objects into
      * @param context
+     *            context for xstream to allow nested objects
      * @param res
+     *            sample to be saved
      * @param save
+     *            configuration telling us what to save
      */
     protected void saveSubResults(HierarchicalStreamWriter writer, MarshallingContext context,
SampleResult res,
             SampleSaveConfiguration save) {
@@ -213,10 +247,16 @@ public class SampleResultConverter exten
     }
 
     /**
+     * Save assertion results from the sample result into the stream
+     *
      * @param writer
+     *            stream to save objects into
      * @param context
+     *            context for xstream to allow nested objects
      * @param res
+     *            sample to be saved
      * @param save
+     *            configuration telling us what to save
      */
     protected void saveAssertions(HierarchicalStreamWriter writer, MarshallingContext context,
SampleResult res,
             SampleSaveConfiguration save) {
@@ -229,9 +269,16 @@ public class SampleResultConverter exten
     }
 
     /**
+     * Save attributes of the sample result to the stream
+     *
      * @param writer
+     *            stream to save objects into
+     * @param context
+     *            context for xstream to allow nested objects
      * @param res
+     *            sample to be saved
      * @param save
+     *            configuration telling us what to save
      */
     protected void setAttributes(HierarchicalStreamWriter writer, MarshallingContext context,
SampleResult res,
             SampleSaveConfiguration save) {
@@ -291,9 +338,15 @@ public class SampleResultConverter exten
     }
 
     /**
+     * Write a tag with with a content of <code>value</code> to the
+     * <code>writer</code>
+     * 
      * @param writer
+     *            writer to write the tag into
      * @param tag
+     *            name of the tag to use
      * @param value
+     *            content for tag
      */
     protected void writeString(HierarchicalStreamWriter writer, String tag, String value)
{
         if (value != null) {
@@ -327,10 +380,11 @@ public class SampleResultConverter exten
 
     /**
      *
-     * @param reader
-     * @param context
-     * @param res
-     * @return true if the item was processed (for HTTPResultConverter)
+     * @param reader stream from which the objects should be read
+     * @param context context for xstream to allow nested objects
+     * @param res sample result into which the information should be retrieved
+     * @param subItem sub item which should be added into <code>res</code>
+     * @return <code>true</code> if the item was processed (for HTTPResultConverter)
      */
     protected boolean retrieveItem(HierarchicalStreamReader reader, UnmarshallingContext
context, SampleResult res,
             Object subItem) {
@@ -358,7 +412,7 @@ public class SampleResultConverter exten
             res.setSamplerData((String) subItem);
         } else if (nodeName.equals(TAG_RESPONSE_FILE)) {
             res.setResultFileName((String) subItem);
-        // Don't try restoring the URL TODO: wy not?
+        // Don't try restoring the URL TODO: why not?
         } else {
             return false;
         }
@@ -366,8 +420,9 @@ public class SampleResultConverter exten
     }
 
     /**
-     * @param reader
-     * @param res
+     * @param reader stream to read objects from
+     * @param context context for xstream to allow nested objects
+     * @param res sample result on which the attributes should be set
      */
     protected void retrieveAttributes(HierarchicalStreamReader reader, UnmarshallingContext
context, SampleResult res) {
         res.setSampleLabel(ConversionHelp.decode(reader.getAttribute(ATT_LABEL)));

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellTestElement.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellTestElement.java?rev=1649516&r1=1649515&r2=1649516&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellTestElement.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellTestElement.java Mon Jan  5 12:33:41
2015
@@ -134,7 +134,7 @@ public abstract class BeanShellTestEleme
      * @param bsh the interpreter, not {@code null}
      * @return the result of the script, may be {@code null}
      * 
-     * @throws JMeterException
+     * @throws JMeterException when working with the bsh fails
      */
     protected Object processFileOrScript(BeanShellInterpreter bsh) throws JMeterException{
         String fileName = getFilename();

Modified: jmeter/trunk/src/core/org/apache/jmeter/visualizers/gui/AbstractVisualizer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/visualizers/gui/AbstractVisualizer.java?rev=1649516&r1=1649515&r2=1649516&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/visualizers/gui/AbstractVisualizer.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/visualizers/gui/AbstractVisualizer.java Mon Jan
 5 12:33:41 2015
@@ -193,6 +193,8 @@ public abstract class AbstractVisualizer
      * necessary if your visualizer requires a differently behaving
      * ResultCollector. Using these methods will allow maximum reuse of the
      * methods provided by AbstractVisualizer in this event.
+     *
+     * @return the associated collector
      */
     protected ResultCollector getModel() {
         return collector;
@@ -345,7 +347,7 @@ public abstract class AbstractVisualizer
      * model for the Visualizer. This is useful to allow maximum reuse of the
      * methods from AbstractVisualizer.
      *
-     * @param collector
+     * @param collector {@link ResultCollector} for the visualizer
      */
     protected void setModel(ResultCollector collector) {
         this.collector = collector;

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java?rev=1649516&r1=1649515&r2=1649516&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
Mon Jan  5 12:33:41 2015
@@ -116,7 +116,7 @@ public class DefaultSamplerCreator exten
      * @param request {@link HttpRequestHdr}
      * @param pageEncodings Map of page encodings
      * @param formEncodings Map of form encodings
-     * @throws Exception
+     * @throws Exception when something fails
      */
     protected void computeFromHeader(HTTPSamplerBase sampler,
             HttpRequestHdr request, Map<String, String> pageEncodings,
@@ -141,7 +141,7 @@ public class DefaultSamplerCreator exten
      * Compute sampler informations from Request Header
      * @param sampler {@link HTTPSamplerBase}
      * @param request {@link HttpRequestHdr}
-     * @throws Exception
+     * @throws Exception when something fails
      */
     protected void computeFromPostBody(HTTPSamplerBase sampler,
             HttpRequestHdr request) throws Exception {
@@ -345,6 +345,7 @@ public class DefaultSamplerCreator exten
      * @param request {@link HttpRequestHdr}
      * @param pageEncodings Map of page encodings
      * @param formEncodings Map of form encodings
+     * @param urlWithoutQuery the request URL without the query parameters
      * @return String content encoding
      */
     protected String computeContentEncoding(HttpRequestHdr request,

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.java?rev=1649516&r1=1649515&r2=1649516&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.java
Mon Jan  5 12:33:41 2015
@@ -97,7 +97,18 @@ public abstract class HTTPAbstractImpl i
     // Provide access to HTTPSamplerBase methods
     
     /**
-     * Invokes {@link HTTPSamplerBase#errorResult(Throwable, HTTPSampleResult)}
+     * Populates the provided HTTPSampleResult with details from the Exception.
+     * Does not create a new instance, so should not be used directly to add a
+     * subsample.
+     * <p>
+     * See {@link HTTPSamplerBase#errorResult(Throwable, HTTPSampleResult)}
+     * 
+     * @param t
+     *            Exception representing the error.
+     * @param res
+     *            SampleResult to be modified
+     * @return the modified sampling result containing details of the Exception.
+     *         Invokes
      */
     protected HTTPSampleResult errorResult(Throwable t, HTTPSampleResult res) {
         return testElement.errorResult(t, res);
@@ -105,6 +116,8 @@ public abstract class HTTPAbstractImpl i
 
     /**
      * Invokes {@link HTTPSamplerBase#getArguments()}
+     *
+     * @return the arguments of the associated test element
      */
     protected Arguments getArguments() {
         return testElement.getArguments();
@@ -112,6 +125,8 @@ public abstract class HTTPAbstractImpl i
 
     /**
      * Invokes {@link HTTPSamplerBase#getAuthManager()}
+     *
+     * @return the {@link AuthManager} of the associated test element
      */
     protected AuthManager getAuthManager() {
         return testElement.getAuthManager();
@@ -119,6 +134,8 @@ public abstract class HTTPAbstractImpl i
 
     /**
      * Invokes {@link HTTPSamplerBase#getAutoRedirects()}
+     *
+     * @return flag whether to do auto redirects
      */
     protected boolean getAutoRedirects() {
         return testElement.getAutoRedirects();
@@ -126,6 +143,8 @@ public abstract class HTTPAbstractImpl i
 
     /**
      * Invokes {@link HTTPSamplerBase#getCacheManager()}
+     *
+     * @return the {@link CacheManager} of the associated test element
      */
     protected CacheManager getCacheManager() {
         return testElement.getCacheManager();
@@ -133,6 +152,8 @@ public abstract class HTTPAbstractImpl i
 
     /**
      * Invokes {@link HTTPSamplerBase#getConnectTimeout()}
+     *
+     * @return the connect timeout of the associated test element
      */
     protected int getConnectTimeout() {
         return testElement.getConnectTimeout();
@@ -148,6 +169,8 @@ public abstract class HTTPAbstractImpl i
 
     /**
      * Invokes {@link HTTPSamplerBase#getCookieManager()}
+     *
+     * @return the {@link CookieManager} of the associated test element
      */
     protected CookieManager getCookieManager() {
         return testElement.getCookieManager();
@@ -155,13 +178,24 @@ public abstract class HTTPAbstractImpl i
 
     /**
      * Invokes {@link HTTPSamplerBase#getHeaderManager()}
+     *
+     * @return the {@link HeaderManager} of the associated test element
      */
     protected HeaderManager getHeaderManager() {
         return testElement.getHeaderManager();
     }
 
     /**
+     * 
+     * Get the collection of files as a list.
+     * The list is built up from the filename/filefield/mimetype properties,
+     * plus any additional entries saved in the FILE_ARGS property.
+     * <p>
+     * If there are no valid file entries, then an empty list is returned.
+     * <p>
      * Invokes {@link HTTPSamplerBase#getHTTPFiles()}
+     *
+     * @return an array of file arguments (never <code>null</code>)
      */
     protected HTTPFileArg[] getHTTPFiles() {
         return testElement.getHTTPFiles();
@@ -169,6 +203,8 @@ public abstract class HTTPAbstractImpl i
 
     /**
      * Invokes {@link HTTPSamplerBase#getIpSource()}
+     *
+     * @return the configured ip source for the associated test element
      */
     protected String getIpSource() {
         return testElement.getIpSource();
@@ -177,9 +213,9 @@ public abstract class HTTPAbstractImpl i
     /**
      * Gets the IP source address (IP spoofing) if one has been provided.
      * 
-     * @return the IP source address to use (or null, if none provided or the device address
could not be found)
-     * @throws UnknownHostException
-     * @throws SocketException 
+     * @return the IP source address to use (or <code>null</code>, if none provided
or the device address could not be found)
+     * @throws UnknownHostException if the hostname/ip for {@link #getIpSource()} could not
be resolved or not interface was found for it
+     * @throws SocketException if an I/O error occurs
      */
     protected InetAddress getIpSourceAddress() throws UnknownHostException, SocketException
{
         final String ipSource = getIpSource();
@@ -219,6 +255,8 @@ public abstract class HTTPAbstractImpl i
 
     /**
      * Invokes {@link HTTPSamplerBase#getProxyHost()}
+     *
+     * @return the configured host to use as a proxy
      */
     protected String getProxyHost() {
         return testElement.getProxyHost();
@@ -226,6 +264,8 @@ public abstract class HTTPAbstractImpl i
 
     /**
      * Invokes {@link HTTPSamplerBase#getProxyPass()}
+     *
+     * @return the configured password to use for the proxy
      */
     protected String getProxyPass() {
         return testElement.getProxyPass();
@@ -233,6 +273,8 @@ public abstract class HTTPAbstractImpl i
 
     /**
      * Invokes {@link HTTPSamplerBase#getProxyPortInt()}
+     *
+     * @return the configured port to use for the proxy
      */
     protected int getProxyPortInt() {
         return testElement.getProxyPortInt();
@@ -240,6 +282,8 @@ public abstract class HTTPAbstractImpl i
 
     /**
      * Invokes {@link HTTPSamplerBase#getProxyUser()}
+     *
+     * @return the configured user to use for the proxy
      */
     protected String getProxyUser() {
         return testElement.getProxyUser();
@@ -247,6 +291,8 @@ public abstract class HTTPAbstractImpl i
 
     /**
      * Invokes {@link HTTPSamplerBase#getResponseTimeout()}
+     *
+     * @return the configured timeout for responses
      */
     protected int getResponseTimeout() {
         return testElement.getResponseTimeout();
@@ -257,6 +303,8 @@ public abstract class HTTPAbstractImpl i
      * entity enclosing request such as POST, PUT or PATCH.
      * 
      * Invokes {@link HTTPSamplerBase#getSendFileAsPostBody()}
+     *
+     * @return flag whether to send a file as POST, PUT or PATCH
      */
     protected boolean getSendFileAsPostBody() {
         return testElement.getSendFileAsPostBody();
@@ -267,6 +315,8 @@ public abstract class HTTPAbstractImpl i
      * entity enclosing request such as POST, PUT or PATCH.
      * 
      * Invokes {@link HTTPSamplerBase#getSendParameterValuesAsPostBody()}
+     *
+     * @return flag whether to send concatenated parameters as the entire body
      */
     protected boolean getSendParameterValuesAsPostBody() {
         return testElement.getSendParameterValuesAsPostBody();
@@ -274,13 +324,21 @@ public abstract class HTTPAbstractImpl i
 
     /**
      * Invokes {@link HTTPSamplerBase#getUseKeepAlive()}
+     *
+     * @return flag whether to use keep-alive for requests
      */
     protected boolean getUseKeepAlive() {
         return testElement.getUseKeepAlive();
     }
 
     /**
+     * Determine if we should use <code>multipart/form-data</code> or
+     * <code>application/x-www-form-urlencoded</code> for the post
+     * <p>
      * Invokes {@link HTTPSamplerBase#getUseMultipartForPost()}
+     *
+     * @return <code>true</code> if <code>multipart/form-data</code>
should be
+     *         used and method is POST
      */
     protected boolean getUseMultipartForPost() {
         return testElement.getUseMultipartForPost();
@@ -288,6 +346,8 @@ public abstract class HTTPAbstractImpl i
 
     /**
      * Invokes {@link HTTPSamplerBase#getDoBrowserCompatibleMultipart()}
+     *
+     * @return flag whether we should do browser compatible multiparts
      */
     protected boolean getDoBrowserCompatibleMultipart() {
         return testElement.getDoBrowserCompatibleMultipart();
@@ -295,6 +355,8 @@ public abstract class HTTPAbstractImpl i
 
     /**
      * Invokes {@link HTTPSamplerBase#hasArguments()}
+     *
+     * @return flag whether we have arguments to send
      */
     protected boolean hasArguments() {
         return testElement.hasArguments();
@@ -302,20 +364,48 @@ public abstract class HTTPAbstractImpl i
 
     /**
      * Invokes {@link HTTPSamplerBase#isMonitor()}
+     *
+     * @return flag whether monitor is enabled
      */
     protected boolean isMonitor() {
         return testElement.isMonitor();
     }
 
     /**
+     * Determine if the HTTP status code is successful or not i.e. in range 200
+     * to 399 inclusive
+     * <p>
      * Invokes {@link HTTPSamplerBase#isSuccessCode(int)}
+     *
+     * @param errorLevel
+     *            status code to check
+     * @return whether in range 200-399 or not
      */
     protected boolean isSuccessCode(int errorLevel) {
         return testElement.isSuccessCode(errorLevel);
     }
 
     /**
-     * Invokes {@link HTTPSamplerBase#readResponse(SampleResult, InputStream, int)}
+     * Read response from the input stream, converting to MD5 digest if the
+     * useMD5 property is set.
+     * <p>
+     * For the MD5 case, the result byte count is set to the size of the
+     * original response.
+     * <p>
+     * Closes the inputStream
+     * <p>
+     * Invokes
+     * {@link HTTPSamplerBase#readResponse(SampleResult, InputStream, int)}
+     * 
+     * @param res
+     *            sample to store information about the response into
+     * @param instream
+     *            input stream from which to read the response
+     * @param responseContentLength
+     *            expected input length or zero
+     * @return the response or the MD5 of the response
+     * @throws IOException
+     *             if reading the result fails
      */
     protected byte[] readResponse(SampleResult res, InputStream instream,
             int responseContentLength) throws IOException {
@@ -323,7 +413,25 @@ public abstract class HTTPAbstractImpl i
     }
 
     /**
+     * Read response from the input stream, converting to MD5 digest if the
+     * useMD5 property is set.
+     * <p>
+     * For the MD5 case, the result byte count is set to the size of the
+     * original response.
+     * <p>
+     * Closes the inputStream
+     * <p>
      * Invokes {@link HTTPSamplerBase#readResponse(SampleResult, InputStream, int)}
+     * 
+     * @param res
+     *            sample to store information about the response into
+     * @param in
+     *            input stream from which to read the response
+     * @param contentLength
+     *            expected input length or zero
+     * @return the response or the MD5 of the response
+     * @throws IOException
+     *             when reading the result fails
      */
     protected byte[] readResponse(SampleResult res, BufferedInputStream in,
             int contentLength) throws IOException {
@@ -331,7 +439,24 @@ public abstract class HTTPAbstractImpl i
     }
 
     /**
-     * Invokes {@link HTTPSamplerBase#resultProcessing(boolean, int, HTTPSampleResult)}
+     * Follow redirects and download page resources if appropriate. this works,
+     * but the container stuff here is what's doing it. followRedirects() is
+     * actually doing the work to make sure we have only one container to make
+     * this work more naturally, I think this method - sample() - needs to take
+     * an HTTPSamplerResult container parameter instead of a
+     * boolean:areFollowingRedirect.
+     * <p>
+     * Invokes
+     * {@link HTTPSamplerBase#resultProcessing(boolean, int, HTTPSampleResult)}
+     *
+     * @param areFollowingRedirect
+     *            flag whether we are getting a redirect target
+     * @param frameDepth
+     *            Depth of this target in the frame structure. Used only to
+     *            prevent infinite recursion.
+     * @param res
+     *            sample result to process
+     * @return the sample result
      */
     protected HTTPSampleResult resultProcessing(boolean areFollowingRedirect,
             int frameDepth, HTTPSampleResult res) {
@@ -340,6 +465,8 @@ public abstract class HTTPAbstractImpl i
 
     /**
      * Invokes {@link HTTPSamplerBase#setUseKeepAlive(boolean)}
+     *
+     * @param b flag whether to use keep-alive for requests
      */
     protected void setUseKeepAlive(boolean b) {
         testElement.setUseKeepAlive(b);

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=1649516&r1=1649515&r2=1649516&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
Mon Jan  5 12:33:41 2015
@@ -428,13 +428,22 @@ public class HTTPHC4Impl extends HTTPHCA
     }
 
     /**
-     * Calls sendPostData if method is POST and sendEntityData if method is PUT or PATCH
+     * Calls {@link #sendPostData(HttpPost)} if method is <code>POST</code> and
+     * {@link #sendEntityData(HttpEntityEnclosingRequestBase)} if method is
+     * <code>PUT</code> or <code>PATCH</code>
+     * <p>
      * Field HTTPSampleResult#queryString of result is modified in the 2 cases
-     * @param method String HTTP method
-     * @param result {@link HTTPSampleResult}
-     * @param httpRequest {@link HttpRequestBase}
-     * @param localContext {@link HttpContext}
+     * 
+     * @param method
+     *            String HTTP method
+     * @param result
+     *            {@link HTTPSampleResult}
+     * @param httpRequest
+     *            {@link HttpRequestBase}
+     * @param localContext
+     *            {@link HttpContext}
      * @throws IOException
+     *             when posting data fails due to I/O
      */
     protected void handleMethod(String method, HTTPSampleResult result,
             HttpRequestBase httpRequest, HttpContext localContext) throws IOException {
@@ -724,10 +733,15 @@ public class HTTPHC4Impl extends HTTPHCA
      * <li>Calls setConnectionHeaders to setup headers</li>
      * <li>Calls setConnectionCookie to setup Cookie</li>
      * </ul>
+     * 
      * @param url
+     *            {@link URL} of the request
      * @param httpRequest
+     *            http request for the request
      * @param res
+     *            sample result to set cookies on
      * @throws IOException
+     *             if hostname/ip to use could not be figured out
      */
     protected void setupRequest(URL url, HttpRequestBase httpRequest, HTTPSampleResult res)
         throws IOException {
@@ -958,7 +972,7 @@ public class HTTPHC4Impl extends HTTPHCA
      * 
      * @param post {@link HttpPost}
      * @return String posted body if computable
-     * @throws IOException
+     * @throws IOException if sending the data fails due to I/O
      */
     protected String sendPostData(HttpPost post)  throws IOException {
         // Buffer to hold the post body, except file content

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/Filter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/Filter.java?rev=1649516&r1=1649515&r2=1649516&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/Filter.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/Filter.java
Mon Jan  5 12:33:41 2015
@@ -40,22 +40,22 @@ import org.apache.jmeter.testelement.Tes
 public interface Filter {
 
     /**
-     * @param oldextension
-     * @param newextension
+     * @param oldextension old extension
+     * @param newextension new extension
      */
     void setReplaceExtension(String oldextension, String newextension);
 
     /**
      * Include all files in the array.
      *
-     * @param filenames
+     * @param filenames names of files to include
      */
     void includeFiles(String[] filenames);
 
     /**
      * Exclude all files in the array
      *
-     * @param filenames
+     * @param filenames names of files to exclude
      */
     void excludeFiles(String[] filenames);
 
@@ -63,7 +63,7 @@ public interface Filter {
      * Include any log entry that contains the following regular expression
      * pattern.
      *
-     * @param regexp
+     * @param regexp list of regexp that match entries that should be included
      */
     void includePattern(String[] regexp);
 
@@ -71,7 +71,7 @@ public interface Filter {
      * Exclude any log entry that contains the following regular expression
      * pattern.
      *
-     * @param regexp
+     * @param regexp list of regexp that match entries that should be excluded
      */
     void excludePattern(String[] regexp);
 
@@ -95,7 +95,7 @@ public interface Filter {
      * is migrating from one platform to another and the file extension changes,
      * the filter provides an easy way to do it without spending a lot of time.
      *
-     * @param text
+     * @param text log line to be filtered
      * @return String
      */
     String filter(String text);

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java?rev=1649516&r1=1649515&r2=1649516&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java
Mon Jan  5 12:33:41 2015
@@ -45,8 +45,6 @@ import org.apache.oro.text.regex.Perl5Co
  * <p>
  * Example of how to use it is provided in the main method. An example is
  * provided below.
- * <p>
- *
  * <pre>
  * testf = new LogFilter();
  * String[] incl = { &quot;hello.html&quot;, &quot;index.html&quot;, &quot;/index.jsp&quot;
};
@@ -69,8 +67,6 @@ import org.apache.oro.text.regex.Perl5Co
  * you if a string should be filtered. The second step is to filter the string,
  * which will return null if it is filtered and replace any part of the string
  * that should be replaced.
- * <p>
- *
  */
 
 public class LogFilter implements Filter, Serializable {
@@ -251,7 +247,7 @@ public class LogFilter implements Filter
      * throws an exception and tells the user the same filename is in both the
      * include and exclude array.
      *
-     * @param file
+     * @param file the file to filter
      * @return boolean
      */
     protected boolean filterFile(String file) {
@@ -321,7 +317,7 @@ public class LogFilter implements Filter
      * the method will return true if the text should be filtered. If not, it
      * will return false, which means it should not be filtered.
      *
-     * @param text
+     * @param text text to be checked
      * @return boolean
      */
     protected boolean filterPattern(String text) {
@@ -337,8 +333,8 @@ public class LogFilter implements Filter
      * By default, the method assumes the entry is not included, unless it
      * matches. In that case, it will return true.
      *
-     * @param text
-     * @return true if text is included
+     * @param text text to be checked
+     * @return <code>true</code> if text is included
      */
     protected boolean incPattern(String text) {
         this.USEFILE = false;
@@ -355,8 +351,8 @@ public class LogFilter implements Filter
      * The method assumes by default the text is not excluded. If the text
      * matches the pattern, it will then return true.
      *
-     * @param text
-     * @return true if text is excluded
+     * @param text text to be checked
+     * @return <code>true</code> if text is excluded
      */
     protected boolean excPattern(String text) {
         this.USEFILE = true;

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogParser.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogParser.java?rev=1649516&r1=1649515&r2=1649516&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogParser.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogParser.java
Mon Jan  5 12:33:41 2015
@@ -62,7 +62,7 @@ public interface LogParser {
      * clean it up is a bit tedious. One example of this is using the filter to
      * exclude any log entry that has a 505 response code.
      *
-     * @param filter
+     * @param filter {@link Filter} to use
      */
     void setFilter(Filter filter);
 
@@ -71,7 +71,7 @@ public interface LogParser {
      * using Class.newInstance(). Then the access log file is set using this
      * method.
      *
-     * @param source
+     * @param source name of the access log file
      */
     void setSourceFile(String source);
 }

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/SharedTCLogParser.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/SharedTCLogParser.java?rev=1649516&r1=1649515&r2=1649516&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/SharedTCLogParser.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/SharedTCLogParser.java
Mon Jan  5 12:33:41 2015
@@ -65,6 +65,12 @@ public class SharedTCLogParser extends T
      * while loop if a set number of lines is given.
      *
      * @param breader
+     *            reader to read lines from
+     * @param el
+     *            {@link TestElement} in which to add the parsed lines
+     * @param parseCount
+     *            max number of lines to parse
+     * @return number of read lines
      */
     protected int parse(FileServer breader, TestElement el, int parseCount) {
         int actualCount = 0;

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=1649516&r1=1649515&r2=1649516&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
Mon Jan  5 12:33:41 2015
@@ -249,6 +249,7 @@ public class TCLogParser implements LogP
      * @param breader {@link BufferedReader} to read lines from
      * @param el {@link TestElement} to read lines into
      * @param parseCount number of lines to read
+     * @return number of lines parsed
      */
     protected int parse(BufferedReader breader, TestElement el, int parseCount) {
         int actualCount = 0;
@@ -289,6 +290,7 @@ public class TCLogParser implements LogP
      *
      * @param line single line to be parsed
      * @param el {@link TestElement} in which the line will be added
+     * @return number of lines parsed (zero or one, actually)
      */
     protected int parseLine(String line, TestElement el) {
         int count = 0;

Modified: jmeter/trunk/src/reports/org/apache/jmeter/testelement/BarChart.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/reports/org/apache/jmeter/testelement/BarChart.java?rev=1649516&r1=1649515&r2=1649516&view=diff
==============================================================================
--- jmeter/trunk/src/reports/org/apache/jmeter/testelement/BarChart.java (original)
+++ jmeter/trunk/src/reports/org/apache/jmeter/testelement/BarChart.java Mon Jan  5 12:33:41
2015
@@ -53,7 +53,9 @@ public class BarChart extends AbstractCh
 
     /**
      * Convert the data from SamplingStatCalculator to double array of array
+     * 
      * @param data
+     *            the data to convert
      * @return data values
      */
     public double[][] convertToDouble(List<SamplingStatCalculator> data) {

Modified: jmeter/trunk/test/src/org/apache/jorphan/test/AllTests.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jorphan/test/AllTests.java?rev=1649516&r1=1649515&r2=1649516&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jorphan/test/AllTests.java (original)
+++ jmeter/trunk/test/src/org/apache/jorphan/test/AllTests.java Mon Jan  5 12:33:41 2015
@@ -260,7 +260,7 @@ public final class AllTests {
      * An overridable method that initializes the logging for the unit test run,
      * using the properties file passed in as the second argument.
      * 
-     * @param args
+     * @param args arguments to get the logging setup information from
      */
     protected static void initializeLogging(String[] args) {
         if (args.length >= 2) {
@@ -286,7 +286,7 @@ public final class AllTests {
      * was specified in the command-line arguments), and hands it the name of
      * the properties file to use to configure the system.
      * 
-     * @param args
+     * @param args arguments with the initialization parameter
      */
     protected static void initializeManager(String[] args) {
         if (args.length >= 3) {



Mime
View raw message