You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by se...@apache.org on 2012/10/15 17:38:13 UTC
svn commit: r1398342 -
/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java
Author: sebb
Date: Mon Oct 15 15:38:12 2012
New Revision: 1398342
URL: http://svn.apache.org/viewvc?rev=1398342&view=rev
Log:
Javadoc
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java
Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java?rev=1398342&r1=1398341&r2=1398342&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java Mon Oct 15 15:38:12 2012
@@ -227,16 +227,19 @@ public class HeaderPanel extends Abstrac
}
/**
- * Add values from the clipboard
+ * Add values from the clipboard.
+ * The clipboard is first split into lines, and the lines are then split on ':'
+ * to produce the header name and value.
+ * Lines without a ':' are ignored.
*/
protected void addFromClipboard() {
GuiUtils.stopTableEditing(this.headerTable);
int rowCount = headerTable.getRowCount();
try {
String clipboardContent = GuiUtils.getPastedText();
- String[] clipboardLines = clipboardContent.split("\n");
+ String[] clipboardLines = clipboardContent.split("\n"); // $NON-NLS-1$
for (String clipboardLine : clipboardLines) {
- int index = clipboardLine.indexOf(":");
+ int index = clipboardLine.indexOf(":"); // $NON-NLS-1$
if (index > 0) {
Header header = new Header(clipboardLine.substring(0, index), clipboardLine.substring(index+1));
headerManager.add(header);