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 2013/09/28 01:17:30 UTC
svn commit: r1527121 -
/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/MultipartUrlConfigGui.java
Author: pmouawad
Date: Fri Sep 27 23:17:30 2013
New Revision: 1527121
URL: http://svn.apache.org/r1527121
Log:
Bug 55606 - Use JSyntaxtTextArea for Http Request, JMS Test Elements
Fix test case failure in Headless mode
Bugzilla Id: 55606
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/MultipartUrlConfigGui.java
Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/MultipartUrlConfigGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/MultipartUrlConfigGui.java?rev=1527121&r1=1527120&r2=1527121&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/MultipartUrlConfigGui.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/MultipartUrlConfigGui.java Fri Sep 27 23:17:30 2013
@@ -19,6 +19,7 @@
package org.apache.jmeter.protocol.http.config.gui;
import java.awt.BorderLayout;
+import java.awt.HeadlessException;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
@@ -27,11 +28,15 @@ import javax.swing.JPanel;
import org.apache.jmeter.protocol.http.gui.HTTPFileArgsPanel;
import org.apache.jmeter.testelement.TestElement;
import org.apache.jmeter.util.JMeterUtils;
+import org.apache.jorphan.logging.LoggingManager;
+import org.apache.log.Logger;
public class MultipartUrlConfigGui extends UrlConfigGui {
private static final long serialVersionUID = 240L;
+ private static final Logger log = LoggingManager.getLoggerForClass();
+
/**
* Files panel that holds file informations to be uploaded by
* http request.
@@ -68,26 +73,32 @@ public class MultipartUrlConfigGui exten
}
private void init() {// called from ctor, so must not be overridable
- this.setLayout(new BorderLayout());
-
- // WEB REQUEST PANEL
- JPanel webRequestPanel = new JPanel();
- webRequestPanel.setLayout(new BorderLayout());
- webRequestPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
- JMeterUtils.getResString("web_request"))); // $NON-NLS-1$
-
- JPanel northPanel = new JPanel();
- northPanel.setLayout(new BoxLayout(northPanel, BoxLayout.Y_AXIS));
- northPanel.add(getProtocolAndMethodPanel());
- northPanel.add(getPathPanel());
-
- webRequestPanel.add(northPanel, BorderLayout.NORTH);
- webRequestPanel.add(getParameterPanel(), BorderLayout.CENTER);
- webRequestPanel.add(getHTTPFileArgsPanel(), BorderLayout.SOUTH);
-
- this.add(getWebServerTimeoutPanel(), BorderLayout.NORTH);
- this.add(webRequestPanel, BorderLayout.CENTER);
- this.add(getProxyServerPanel(), BorderLayout.SOUTH);
+ try {
+ this.setLayout(new BorderLayout());
+
+ // WEB REQUEST PANEL
+ JPanel webRequestPanel = new JPanel();
+ webRequestPanel.setLayout(new BorderLayout());
+ webRequestPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
+ JMeterUtils.getResString("web_request"))); // $NON-NLS-1$
+
+ JPanel northPanel = new JPanel();
+ northPanel.setLayout(new BoxLayout(northPanel, BoxLayout.Y_AXIS));
+ northPanel.add(getProtocolAndMethodPanel());
+ northPanel.add(getPathPanel());
+
+ webRequestPanel.add(northPanel, BorderLayout.NORTH);
+ webRequestPanel.add(getParameterPanel(), BorderLayout.CENTER);
+ webRequestPanel.add(getHTTPFileArgsPanel(), BorderLayout.SOUTH);
+
+ this.add(getWebServerTimeoutPanel(), BorderLayout.NORTH);
+ this.add(webRequestPanel, BorderLayout.CENTER);
+ this.add(getProxyServerPanel(), BorderLayout.SOUTH);
+ }
+ catch (HeadlessException e){
+ // When running in Headless mode, avoid unit tests failures
+ log.warn(e.toString());
+ }
}
private JPanel getHTTPFileArgsPanel() {