Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed commented out code #319

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,6 @@ private void init() { // WARNING: called from ctor so must not be overridden (i.
// doctype
HorizontalPanel docTypePanel = new HorizontalPanel();
docTypeBox = new JComboBox<>(new String[] { "omit", "auto", "strict", "loose" });
// docTypePanel.add(new
// JLabel(JMeterUtils.getResString("duration_assertion_label"))); //$NON-NLS-1$
docTypePanel.add(new JLabel("Doctype:"));
docTypePanel.add(docTypeBox);
assertionPanel.add(docTypePanel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ public void process() {
String[] defaultValues = getDefaultValues().split(SEPARATOR);
int[] matchNumbers = getMatchNumbersAsInt(defaultValues.length);

//jsonResponse = jsonResponse.replaceAll("'", "\""); // $NON-NLS-1$ $NON-NLS-2$

if (refNames.length != jsonPathExpressions.length ||
refNames.length != defaultValues.length) {
log.error("Number of JSON Path variables must match number of default values and json-path expressions, check you use separator ';' if you have many values"); // $NON-NLS-1$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ public class RenderAsRegexp implements ResultRenderer, ActionListener {
/** {@inheritDoc} */
@Override
public void clearData() {
// N.B. don't set regexpField to empty to keep regexp
this.regexpDataField.setText(""); // $NON-NLS-1$
// don't set empty to keep regexp
// regexpField.setText(""); // $NON-NLS-1$
this.regexpResultField.setText(""); // $NON-NLS-1$
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ public class RenderAsXPath implements ResultRenderer, ActionListener {
/** {@inheritDoc} */
@Override
public void clearData() {
// N.B. don't set xpathExpressionField to empty to keep xpath
this.xmlDataField.setText(""); // $NON-NLS-1$
// don't set empty to keep xpath
// xpathExpressionField.setText(""); // $NON-NLS-1$
this.xpathResultField.setText(""); // $NON-NLS-1$
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ public SearchTreePanel(DefaultMutableTreeNode defaultMutableTreeNode) {
* @deprecated only for use by test code
*/
@Deprecated
public SearchTreePanel(){
// log.warn("Constructor only intended for use in testing"); // $NON-NLS-1$
public SearchTreePanel() {
}

private class EnterAction extends AbstractAction {
Expand Down
5 changes: 0 additions & 5 deletions src/core/org/apache/jmeter/samplers/RemoteSampleListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ public interface RemoteSampleListener extends java.rmi.Remote {

void testEnded(String host) throws RemoteException;

// Not currently needed by any Remoteable classes
// Anyway, would probably be too expensive in terms of network traffic
//
// void testIterationStart(LoopIterationEvent event);

/**
* This method is called remotely and fires a list of samples events
* received locally. The function is to reduce network load when using
Expand Down
1 change: 0 additions & 1 deletion src/core/org/apache/jmeter/save/CSVSaveService.java
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,6 @@ private void addDelim() {
// quotes:
public void append(String s) {
addDelim();
// if (s == null) return;
sb.append(quoteDelimiters(s, specials));
}

Expand Down
1 change: 0 additions & 1 deletion src/core/org/apache/jmeter/save/SaveService.java
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,6 @@ static String getFileVersion(){
static List<String> checkClasses(){
final ClassLoader classLoader = SaveService.class.getClassLoader();
List<String> missingClasses = new ArrayList<>();
//boolean OK = true;
for (Object clazz : classToAlias.keySet()) {
String name = (String) clazz;
if (!NameUpdater.isMapped(name)) {// don't bother checking class is present if it is to be updated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ public class SampleResultConverter extends AbstractCollectionConverter {
protected static final String TAG_REDIRECT_LOCATION = "redirectLocation"; //$NON-NLS-1$
protected static final String TAG_REQUEST_HEADER = "requestHeader"; //$NON-NLS-1$

//NOT USED protected static final String TAG_URL = "requestUrl"; //$NON-NLS-1$

protected static final String TAG_RESPONSE_DATA = "responseData"; //$NON-NLS-1$
protected static final String TAG_RESPONSE_HEADER = "responseHeader"; //$NON-NLS-1$
protected static final String TAG_SAMPLER_DATA = "samplerData"; //$NON-NLS-1$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,24 +538,6 @@ public void setObject(Object map) {
}
}

// /**
// * Find the index of the property of the given name.
// *
// * @param name
// * the name of the property
// * @return the index of that property in the descriptors array, or -1 if
// * there's no property of this name.
// */
// private int descriptorIndex(String name) // NOTUSED
// {
// for (int i = 0; i < descriptors.length; i++) {
// if (descriptors[i].getName().equals(name)) {
// return i;
// }
// }
// return -1;
// }

/**
* Initialize the GUI.
*/
Expand Down
2 changes: 0 additions & 2 deletions src/core/org/apache/jmeter/testbeans/gui/TestBeanGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,6 @@ public TestElement createTestElement() {
if(initialized) {
setValues(element);
}
// configure(element);
// super.clear(); // set name, enabled.
modifyTestElement(element); // put the default values back into the
// new element
return element;
Expand Down
1 change: 0 additions & 1 deletion src/core/org/apache/jmeter/util/BeanShellClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ private static class SockRead extends Thread {

public SockRead(InputStream _is) {
this.is=_is;
//this.setDaemon(true);
}

@Override
Expand Down
2 changes: 0 additions & 2 deletions src/core/org/apache/jmeter/util/JMeterUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@ public static void loadJMeterProperties(String file) {
}
p.load(is);
} catch (IOException ex) {
// JMeter.fail("Could not read internal resource. " +
// "Archive is broken.");
}
} finally {
JOrphanUtils.closeQuietly(is);
Expand Down
10 changes: 3 additions & 7 deletions src/core/org/apache/jmeter/util/JsseSSLManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,9 @@ public JsseSSLManager(Provider provider) {
@Override
public void setContext(HttpURLConnection conn) {
if (conn instanceof HttpsURLConnection) {
/*
* No point doing this on a per-connection basis, as there is currently no way to configure it.
* So we leave it to the defaults set up in the SSL Context
*
*/
// HttpsURLConnection secureConn = (HttpsURLConnection) conn;
// secureConn.setSSLSocketFactory(this.getContext().getSocketFactory());
// No point doing this on a per-connection basis,
// as there is currently no way to configure it.
// So we leave it to the defaults set up in the SSL Context
} else {
if (log.isWarnEnabled()) {
log.warn("Unexpected HttpURLConnection class: {}", conn.getClass().getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ abstract class AbstractHostIPName extends AbstractFunction {
private static final List<String> desc = new LinkedList<>();

static {
// desc.add("Use fully qualified host name: TRUE/FALSE (Default FALSE)");
desc.add(JMeterUtils.getResString("function_name_paropt")); //$NON-NLS-1$
}

Expand Down
2 changes: 0 additions & 2 deletions src/jorphan/org/apache/commons/cli/avalon/CLArgsParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,6 @@ private void parseArguments() throws ParseException {

final String argument = sb.toString();

// System.out.println( "Argument:" + argument );

this.option.addArgument(argument);
addOption(this.option);
this.option = null;
Expand Down
1 change: 0 additions & 1 deletion src/jorphan/org/apache/jorphan/gui/MenuScroller.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
*/
public class MenuScroller {

// private JMenu menu;
private JPopupMenu menu;
private Component[] menuItems;
private MenuScrollItem upItem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ public VerticalLayout(int vgap, int alignment, int anchor) {
@Override
public void layoutContainer(Container parent) {
Insets insets = parent.getInsets();
// NOTUSED Dimension dim = layoutSize(parent, false);
synchronized (parent.getTreeLock()) {
int n = parent.getComponentCount();
Dimension pd = parent.getSize();
Expand Down
1 change: 0 additions & 1 deletion src/jorphan/org/apache/jorphan/util/Converter.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ public static Date getDate(Object date, Date defaultValue) {
return (Date) date;
} else if (date != null) {
DateFormat formatter = DateFormat.getDateInstance(DateFormat.SHORT);
// java.util.Date d = null;
try {
val = formatter.parse(date.toString());
} catch (ParseException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ public SampleResult sample(Entry e) {
} else {
res.setResponseCode("501"); // TODO
res.setResponseMessage("Could not connect");
//res.setResponseCode(Integer.toString(ftp.getReplyCode()));
res.setResponseMessage(ftp.getReplyString());
}
} catch (IOException ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,6 @@ private static String getRequestHeaderValue(String requestHeaders, String header
Pattern pattern = JMeterUtils.getPattern(expression, Perl5Compiler.READ_ONLY_MASK | Perl5Compiler.CASE_INSENSITIVE_MASK | Perl5Compiler.MULTILINE_MASK);
if(localMatcher.contains(requestHeaders, pattern)) {
// The value is in the first group, group 0 is the whole match
// System.out.println("Found:'"+localMatcher.getMatch().group(1)+"'");
// System.out.println("in: '"+localMatcher.getMatch().group(0)+"'");
return localMatcher.getMatch().group(1);
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ public void process() {
}
} else {
sampler.setArguments(url.getArguments());
// config.parseArguments(url.getQueryString());
}
sampler.setProtocol(url.getProtocol());
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public class URLRewritingModifier extends AbstractTestElement implements Seriali

private transient Pattern pathExtensionNoEqualsNoQuestionmarkRegexp;

// transient Perl5Compiler compiler = new Perl5Compiler();
private static final String ARGUMENT_NAME = "argument_name"; // $NON-NLS-1$

private static final String PATH_EXTENSION = "path_extension"; // $NON-NLS-1$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,6 @@ public static List<HTTPSamplerBase> createURLFromForm(Node doc, URL context) {
String selectName = null;
LinkedList<HTTPSamplerBase> urlConfigs = new LinkedList<>();
recurseForm(doc, urlConfigs, context, selectName, false);
/*
* NamedNodeMap atts = formNode.getAttributes();
* if(atts.getNamedItem("action") == null) { throw new
* MalformedURLException(); } String action =
* atts.getNamedItem("action").getNodeValue(); UrlConfig url =
* createUrlFromAnchor(action, context); recurseForm(doc, url,
* selectName,true,formStart);
*/
return urlConfigs;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,6 @@ private URL scanNodes(Node node, URLCollection urls, URL baseUrl) throws HTMLPar

break;

// case Node.TEXT_NODE:
// break;

default:
// ignored
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@ public boolean addURL(String url, URL baseUrl) {
if (url == null || url.length() == 0) {
return false;
}
//url.replace('+',' ');
url=StringEscapeUtils.unescapeXml(url);
boolean b = false;
boolean b;
try {
b = this.add(ConversionUtils.makeRelativeURL(baseUrl, url));
} catch (MalformedURLException mfue) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1335,11 +1335,6 @@ protected String sendPostData(HttpPost post) throws IOException {
} else {
postedBody.append("<Multipart was not repeatable, cannot view what was sent>"); // $NON-NLS-1$
}

// // Set the content type TODO - needed?
// String multiPartContentType = multiPart.getContentType().getValue();
// post.setHeader(HEADER_CONTENT_TYPE, multiPartContentType);

} else { // not multipart
// Check if the header manager had a content type header
// This allows the user to specify his own content-type for a POST request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,6 @@ protected HttpURLConnection setupConnection(URL u, String method, HTTPSampleResu
if (proxyHost.length() > 0 && proxyPort > 0){
Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyHost, proxyPort));
//TODO - how to define proxy authentication for a single connection?
// It's not clear if this is possible
// String user = getProxyUser();
// if (user.length() > 0){
// Authenticator auth = new ProxyAuthenticator(user, getProxyPass());
// }
conn = (HttpURLConnection) u.openConnection(proxy);
} else {
conn = (HttpURLConnection) u.openConnection();
Expand Down Expand Up @@ -316,11 +311,6 @@ protected byte[] readResponse(HttpURLConnection conn, SampleResult res) throws I
protected String getResponseHeaders(HttpURLConnection conn) {
StringBuilder headerBuf = new StringBuilder();
headerBuf.append(conn.getHeaderField(0));// Leave header as is
// headerBuf.append(conn.getHeaderField(0).substring(0, 8));
// headerBuf.append(" ");
// headerBuf.append(conn.getResponseCode());
// headerBuf.append(" ");
// headerBuf.append(conn.getResponseMessage());
headerBuf.append("\n"); //$NON-NLS-1$

String hfk;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,6 @@ protected int parse(BufferedReader breader, TestElement el, int parseCount) {
if (line == null) {
breader.close();
this.READER = null;
// this.READER = new BufferedReader(new
// FileReader(this.SOURCE));
// parse(this.READER,el);
}
} catch (IOException ioe) {
log.error("Error reading log file", ioe);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,7 @@ public void configure(TestElement el) {
providerUrl.setText(sampler.getContextProvider());

jmsPropertiesPanel.configure(sampler.getJMSProperties());
// (TestElement)
// el.getProperty(JMSSampler.JMS_PROPERTIES).getObjectValue());

jndiPropertiesPanel.configure(sampler.getJNDIProperties());
// (TestElement)
// el.getProperty(JMSSampler.JNDI_PROPERTIES).getObjectValue());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,6 @@ public SampleResult sample(Entry e) {
isSuccessful = true;
} catch (Exception ex) {
log.error("Ldap client - ", ex);
// Could time this
// res.sampleEnd();
// if sampleEnd() is not called, elapsed time will remain zero
res.setResponseCode("500");// TODO distinguish errors better //$NON-NLS-1$
res.setResponseMessage(ex.toString());
isSuccessful = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import javax.naming.Context;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
// import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttributes;
import javax.naming.directory.DirContext;
import javax.naming.directory.InitialDirContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,25 +63,6 @@ public class MongoSourceElement
private int writeOperationTimeout;
private boolean continueOnInsertError;

// public final static String CONNECTION = "MongoSourceElement.connection"; //$NON-NLS-1$
// public final static String SOURCE = "MongoSourceElement.source"; //$NON-NLS-1$
//
// public final static String AUTO_CONNECT_RETRY = "MongoSourceElement.autoConnectRetry"; //$NON-NLS-1$
// public final static String CONNECTIONS_PER_HOST = "MongoSourceElement.connectionsPerHost"; //$NON-NLS-1$
// public final static String CONNECT_TIMEOUT = "MongoSourceElement.connectTimeout"; //$NON-NLS-1$
// public final static String CONTINUE_ON_INSERT_ERROR = "MongoSourceElement.continueOnInsertError"; //$NON-NLS-1$
// public final static String MAX_AUTO_CONNECT_RETRY_TIME = "MongoSourceElement.maxAutoConnectRetryTime"; //$NON-NLS-1$
// public final static String MAX_WAIT_TIME = "MongoSourceElement.maxWaitTime"; //$NON-NLS-1$
// public final static String SOCKET_TIMEOUT = "MongoSourceElement.socketTimeout"; //$NON-NLS-1$
// public final static String SOCKET_KEEP_ALIVE = "MongoSourceElement.socketKeepAlive"; //$NON-NLS-1$
// public final static String THREADS_ALLOWED_TO_BLOCK_MULTIPLIER = "MongoSourceElement.threadsAllowedToBlockForConnectionMultiplier"; //$NON-NLS-1$
//
// public final static String FSYNC = "MongoSourceElement.fsync"; //$NON-NLS-1$
// public final static String SAFE = "MongoSourceElement.safe"; //$NON-NLS-1$
// public final static String WAIT_FOR_JOURNALING = "MongoSourceElement.waitForJournaling"; //$NON-NLS-1$
// public final static String WRITE_OPERATION_NUMBER_OF_SERVERS = "MongoSourceElement.writeOperationNumberOfServers"; //$NON-NLS-1$
// public final static String WRITE_OPERATION_TIMEOUT = "MongoSourceElement.writeOperationTimeout"; //$NON-NLS-1$

public String getTitle() {
return this.getName();
}
Expand Down
1 change: 0 additions & 1 deletion test/src/org/apache/jmeter/JMeterVersionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ public void testEclipse() throws Exception {
if (m.matches()) {
String jar = m.group(1);
String version = m.group(2);
// System.out.println(jar + " => " + version);
if (jar.endsWith("-jdk15on")) { // special handling
jar=jar.replace("-jdk15on","");
} else if (jar.equals("commons-jexl") && version.startsWith("2")) { // special handling
Expand Down
Loading