You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2012/08/24 21:45:16 UTC

svn commit: r1377070 - in /jmeter/trunk/src/protocol: http/org/apache/jmeter/protocol/http/control/ http/org/apache/jmeter/protocol/http/proxy/ http/org/apache/jmeter/protocol/http/util/ http/org/apache/jmeter/protocol/http/util/accesslog/ jms/org/apac...

Author: pmouawad
Date: Fri Aug 24 19:45:15 2012
New Revision: 1377070

URL: http://svn.apache.org/viewvc?rev=1377070&view=rev
Log:
Code cleanup : 
Remove public modifier from interface methods
>From JLS : 
It is permitted, but strongly discouraged as a matter of style, to redundantly
specify the public modifier for interface methods.
Remove public static final from interface fields

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CookieHandler.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/SamplerCreator.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.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/Generator.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogParser.java
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/QueueExecutor.java
    jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClient.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CookieHandler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CookieHandler.java?rev=1377070&r1=1377069&r2=1377070&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CookieHandler.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CookieHandler.java Fri Aug 24 19:45:15 2012
@@ -34,7 +34,7 @@ public interface CookieHandler {
 	 * @param cookieHeader String cookie Header
 	 * @param url URL 
 	 */
-	public void addCookieFromHeader(CookieManager cookieManager, boolean checkCookies,
+	void addCookieFromHeader(CookieManager cookieManager, boolean checkCookies,
 			String cookieHeader, URL url);
 
     /**
@@ -45,7 +45,7 @@ public interface CookieHandler {
      *            URL of the request to which the returned header will be added.
      * @return the value string for the cookie header (goes after "Cookie: ").
      */
-	public String getCookieHeaderForURL(CollectionProperty cookiesCP, URL url,
+	String getCookieHeaderForURL(CollectionProperty cookiesCP, URL url,
 			boolean allowVariableCookie);
 
 }

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/SamplerCreator.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/SamplerCreator.java?rev=1377070&r1=1377069&r2=1377070&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/SamplerCreator.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/SamplerCreator.java Fri Aug 24 19:45:15 2012
@@ -30,7 +30,7 @@ public interface SamplerCreator {
     /**
      * @return String[] array of Content types managed by Factory
      */
-    public String[] getManagedContentTypes();
+    String[] getManagedContentTypes();
 
     /**
      * Create HTTPSamplerBase
@@ -39,7 +39,7 @@ public interface SamplerCreator {
      * @param formEncodings Map<String, String>
      * @return {@link HTTPSamplerBase}
      */
-    public HTTPSamplerBase createSampler(HttpRequestHdr request,
+    HTTPSamplerBase createSampler(HttpRequestHdr request,
             Map<String, String> pageEncodings, Map<String, String> formEncodings);
 
     /**
@@ -50,7 +50,7 @@ public interface SamplerCreator {
      * @param formEncodings Map<String, String>
      * @throws Exception
      */
-    public void populateSampler(HTTPSamplerBase sampler,
+    void populateSampler(HTTPSamplerBase sampler,
             HttpRequestHdr request, Map<String, String> pageEncodings,
             Map<String, String> formEncodings)
                     throws Exception;

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.java?rev=1377070&r1=1377069&r2=1377070&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.java Fri Aug 24 19:45:15 2012
@@ -25,46 +25,46 @@ package org.apache.jmeter.protocol.http.
 
 public interface HTTPConstantsInterface {
 
-    public static final int DEFAULT_HTTPS_PORT = 443;
-    public static final String DEFAULT_HTTPS_PORT_STRING = "443"; // $NON-NLS-1$
-    public static final int    DEFAULT_HTTP_PORT = 80;
-    public static final String DEFAULT_HTTP_PORT_STRING = "80"; // $NON-NLS-1$
-    public static final String PROTOCOL_HTTP = "http"; // $NON-NLS-1$
-    public static final String PROTOCOL_HTTPS = "https"; // $NON-NLS-1$
-    public static final String HEAD = "HEAD"; // $NON-NLS-1$
-    public static final String POST = "POST"; // $NON-NLS-1$
-    public static final String PUT = "PUT"; // $NON-NLS-1$
-    public static final String GET = "GET"; // $NON-NLS-1$
-    public static final String OPTIONS = "OPTIONS"; // $NON-NLS-1$
-    public static final String TRACE = "TRACE"; // $NON-NLS-1$
-    public static final String DELETE = "DELETE"; // $NON-NLS-1$
-    public static final String PATCH = "PATCH"; // $NON-NLS-1$
-    public static final String CONNECT = "CONNECT"; // $NON-NLS-1$
-    public static final String HEADER_AUTHORIZATION = "Authorization"; // $NON-NLS-1$
-    public static final String HEADER_COOKIE = "Cookie"; // $NON-NLS-1$
-    public static final String HEADER_CONNECTION = "Connection"; // $NON-NLS-1$
-    public static final String CONNECTION_CLOSE = "close"; // $NON-NLS-1$
-    public static final String KEEP_ALIVE = "keep-alive"; // $NON-NLS-1$
+    final int DEFAULT_HTTPS_PORT = 443;
+    final String DEFAULT_HTTPS_PORT_STRING = "443"; // $NON-NLS-1$
+    final int    DEFAULT_HTTP_PORT = 80;
+    final String DEFAULT_HTTP_PORT_STRING = "80"; // $NON-NLS-1$
+    final String PROTOCOL_HTTP = "http"; // $NON-NLS-1$
+    final String PROTOCOL_HTTPS = "https"; // $NON-NLS-1$
+    final String HEAD = "HEAD"; // $NON-NLS-1$
+    final String POST = "POST"; // $NON-NLS-1$
+    final String PUT = "PUT"; // $NON-NLS-1$
+    final String GET = "GET"; // $NON-NLS-1$
+    final String OPTIONS = "OPTIONS"; // $NON-NLS-1$
+    final String TRACE = "TRACE"; // $NON-NLS-1$
+    final String DELETE = "DELETE"; // $NON-NLS-1$
+    final String PATCH = "PATCH"; // $NON-NLS-1$
+    final String CONNECT = "CONNECT"; // $NON-NLS-1$
+    final String HEADER_AUTHORIZATION = "Authorization"; // $NON-NLS-1$
+    final String HEADER_COOKIE = "Cookie"; // $NON-NLS-1$
+    final String HEADER_CONNECTION = "Connection"; // $NON-NLS-1$
+    final String CONNECTION_CLOSE = "close"; // $NON-NLS-1$
+    final String KEEP_ALIVE = "keep-alive"; // $NON-NLS-1$
     // e.g. "Transfer-Encoding: chunked", which is processed automatically by the underlying protocol
-    public static final String TRANSFER_ENCODING = "transfer-encoding"; // $NON-NLS-1$
-    public static final String HEADER_CONTENT_ENCODING = "content-encoding"; // $NON-NLS-1$
-    public static final String HTTP_1_1 = "HTTP/1.1"; // $NON-NLS-1$
-    public static final String HEADER_SET_COOKIE = "set-cookie"; // $NON-NLS-1$
-    public static final String ENCODING_GZIP = "gzip"; // $NON-NLS-1$
-    public static final String HEADER_CONTENT_DISPOSITION = "Content-Disposition"; // $NON-NLS-1$
-    public static final String HEADER_CONTENT_TYPE = "Content-Type"; // $NON-NLS-1$
-    public static final String HEADER_CONTENT_LENGTH = "Content-Length"; // $NON-NLS-1$
-    public static final String HEADER_HOST = "Host"; // $NON-NLS-1$
-    public static final String HEADER_LOCATION = "Location"; // $NON-NLS-1$
-    public static final String APPLICATION_X_WWW_FORM_URLENCODED = "application/x-www-form-urlencoded"; // $NON-NLS-1$
-    public static final String MULTIPART_FORM_DATA = "multipart/form-data"; // $NON-NLS-1$
+    final String TRANSFER_ENCODING = "transfer-encoding"; // $NON-NLS-1$
+    final String HEADER_CONTENT_ENCODING = "content-encoding"; // $NON-NLS-1$
+    final String HTTP_1_1 = "HTTP/1.1"; // $NON-NLS-1$
+    final String HEADER_SET_COOKIE = "set-cookie"; // $NON-NLS-1$
+    final String ENCODING_GZIP = "gzip"; // $NON-NLS-1$
+    final String HEADER_CONTENT_DISPOSITION = "Content-Disposition"; // $NON-NLS-1$
+    final String HEADER_CONTENT_TYPE = "Content-Type"; // $NON-NLS-1$
+    final String HEADER_CONTENT_LENGTH = "Content-Length"; // $NON-NLS-1$
+    final String HEADER_HOST = "Host"; // $NON-NLS-1$
+    final String HEADER_LOCATION = "Location"; // $NON-NLS-1$
+    final String APPLICATION_X_WWW_FORM_URLENCODED = "application/x-www-form-urlencoded"; // $NON-NLS-1$
+    final String MULTIPART_FORM_DATA = "multipart/form-data"; // $NON-NLS-1$
     // For handling caching
-    public static final String IF_NONE_MATCH = "If-None-Match"; // $NON-NLS-1$
-    public static final String IF_MODIFIED_SINCE = "If-Modified-Since"; // $NON-NLS-1$
-    public static final String ETAG = "Etag"; // $NON-NLS-1$
-    public static final String LAST_MODIFIED = "Last-Modified"; // $NON-NLS-1$
-    public static final String EXPIRES = "Expires"; // $NON-NLS-1$
-    public static final String CACHE_CONTROL = "Cache-Control";  //e.g. public, max-age=259200
-    public static final String DATE = "Date";  //e.g. Date Header of response 
+    final String IF_NONE_MATCH = "If-None-Match"; // $NON-NLS-1$
+    final String IF_MODIFIED_SINCE = "If-Modified-Since"; // $NON-NLS-1$
+    final String ETAG = "Etag"; // $NON-NLS-1$
+    final String LAST_MODIFIED = "Last-Modified"; // $NON-NLS-1$
+    final String EXPIRES = "Expires"; // $NON-NLS-1$
+    final String CACHE_CONTROL = "Cache-Control";  //e.g. public, max-age=259200
+    final String DATE = "Date";  //e.g. Date Header of response 
 
 }

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=1377070&r1=1377069&r2=1377070&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 Fri Aug 24 19:45:15 2012
@@ -43,21 +43,21 @@ public interface Filter {
      * @param oldextension
      * @param newextension
      */
-    public void setReplaceExtension(String oldextension, String newextension);
+    void setReplaceExtension(String oldextension, String newextension);
 
     /**
      * Include all files in the array.
      *
      * @param filenames
      */
-    public void includeFiles(String[] filenames);
+    void includeFiles(String[] filenames);
 
     /**
      * Exclude all files in the array
      *
      * @param filenames
      */
-    public void excludeFiles(String[] filenames);
+    void excludeFiles(String[] filenames);
 
     /**
      * Include any log entry that contains the following regular expression
@@ -65,7 +65,7 @@ public interface Filter {
      *
      * @param regexp
      */
-    public void includePattern(String[] regexp);
+    void includePattern(String[] regexp);
 
     /**
      * Exclude any log entry that contains the following regular expression
@@ -73,7 +73,7 @@ public interface Filter {
      *
      * @param regexp
      */
-    public void excludePattern(String[] regexp);
+    void excludePattern(String[] regexp);
 
     /**
      * Log parser will call this method to see if a particular entry should be
@@ -82,7 +82,7 @@ public interface Filter {
      * @param path
      * @return boolean
      */
-    public boolean isFiltered(String path,TestElement sampler);
+    boolean isFiltered(String path,TestElement sampler);
 
     /**
      * In case the user wants to replace the file extension, log parsers should
@@ -93,7 +93,7 @@ public interface Filter {
      * @param text
      * @return String
      */
-    public String filter(String text);
+    String filter(String text);
 
     /**
      * Tell the filter when the parsing has reached the end of the log file and
@@ -101,6 +101,6 @@ public interface Filter {
      * if needed.
      *
      */
-    public void reset();
+    void reset();
 
 }

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/Generator.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/Generator.java?rev=1377070&r1=1377069&r2=1377070&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/Generator.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/Generator.java Fri Aug 24 19:45:15 2012
@@ -45,42 +45,42 @@ public interface Generator {
     /**
      * close the generator
      */
-    public void close();
+    void close();
 
     /**
      * The host is the name of the server.
      *
      * @param host
      */
-    public void setHost(String host);
+    void setHost(String host);
 
     /**
      * This is the label for the request, which is used in the logs and results.
      *
      * @param label
      */
-    public void setLabel(String label);
+    void setLabel(String label);
 
     /**
      * The method is the HTTP request method. It's normally POST or GET.
      *
      * @param post_get
      */
-    public void setMethod(String post_get);
+    void setMethod(String post_get);
 
     /**
      * Set the request parameters
      *
      * @param params
      */
-    public void setParams(NVPair[] params);
+    void setParams(NVPair[] params);
 
     /**
      * The path is the web page you want to test.
      *
      * @param path
      */
-    public void setPath(String path);
+    void setPath(String path);
 
     /**
      * The default port for HTTP is 80, but not all servers run on that port.
@@ -88,21 +88,21 @@ public interface Generator {
      * @param port -
      *            port number
      */
-    public void setPort(int port);
+    void setPort(int port);
 
     /**
      * Set the querystring for the request if the method is GET.
      *
      * @param querystring
      */
-    public void setQueryString(String querystring);
+    void setQueryString(String querystring);
 
     /**
      * The source logs is the location where the access log resides.
      *
      * @param sourcefile
      */
-    public void setSourceLogs(String sourcefile);
+    void setSourceLogs(String sourcefile);
 
     /**
      * The target can be either a java.io.File or a Sampler. We make it generic,
@@ -110,7 +110,7 @@ public interface Generator {
      *
      * @param target
      */
-    public void setTarget(Object target);
+    void setTarget(Object target);
 
     /**
      * The method is responsible for calling the necessary methods to generate a
@@ -119,18 +119,18 @@ public interface Generator {
      * element, it should return the correct Sampler class with the required
      * fields set.
      */
-    public Object generateRequest();
+    Object generateRequest();
 
     /**
      * If the generator is converting the logs to a .jmx file, save should be
      * called.
      */
-    public void save();
+    void save();
 
     /**
      * The purpose of the reset is so Samplers can explicitly call reset to
      * create a new instance of HTTPSampler.
      *
      */
-    public void reset();
+    void reset();
 }

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=1377070&r1=1377069&r2=1377070&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 Fri Aug 24 19:45:15 2012
@@ -41,7 +41,7 @@ public interface LogParser {
     /**
      * close the any streams or readers.
      */
-    public void close();
+    void close();
 
     /**
      * the method will parse the given number of lines. Pass "-1" to parse the
@@ -52,7 +52,7 @@ public interface LogParser {
      * @param count
      * @return int
      */
-    public int parseAndConfigure(int count, TestElement el);
+    int parseAndConfigure(int count, TestElement el);
 
     /**
      * We allow for filters, so that users can simply point to an Access log
@@ -63,7 +63,7 @@ public interface LogParser {
      *
      * @param filter
      */
-    public void setFilter(Filter filter);
+    void setFilter(Filter filter);
 
     /**
      * The method is provided to make it easy to dynamically create new classes
@@ -72,5 +72,5 @@ public interface LogParser {
      *
      * @param source
      */
-    public void setSourceFile(String source);
+    void setSourceFile(String source);
 }

Modified: jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/QueueExecutor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/QueueExecutor.java?rev=1377070&r1=1377069&r2=1377070&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/QueueExecutor.java (original)
+++ jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/QueueExecutor.java Fri Aug 24 19:45:15 2012
@@ -37,6 +37,6 @@ public interface QueueExecutor {
      * @throws JMSException
      *             in case of an exception from the messaging system
      */
-    public abstract Message sendAndReceive(Message request) throws JMSException;
+    Message sendAndReceive(Message request) throws JMSException;
 
 }
\ No newline at end of file

Modified: jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClient.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClient.java?rev=1377070&r1=1377069&r2=1377070&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClient.java (original)
+++ jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClient.java Fri Aug 24 19:45:15 2012
@@ -74,14 +74,14 @@ public interface TCPClient {
      * Get the end-of-line/end-of-message byte.
      * @return Returns the eolByte.
      */
-    public byte getEolByte();
+    byte getEolByte();
     
 
     /**
      * Get the charset.
      * @return Returns the charset.
      */
-    public String getCharset();
+    String getCharset();
 
     /**
      * Set the end-of-line/end-of-message byte.
@@ -90,5 +90,5 @@ public interface TCPClient {
      * @param eolInt
      *            The value to set
      */
-    public void setEolByte(int eolInt);
+    void setEolByte(int eolInt);
 }
\ No newline at end of file