jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1242196 - in /jmeter/trunk/src/components/org/apache/jmeter: reporters/MailerModel.java visualizers/MailerVisualizer.java
Date Thu, 09 Feb 2012 01:00:31 GMT
Author: sebb
Date: Thu Feb  9 01:00:30 2012
New Revision: 1242196

URL: http://svn.apache.org/viewvc?rev=1242196&view=rev
Log:
Store the port as a String - allows the use of functions and variables

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/reporters/MailerModel.java
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/MailerVisualizer.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/reporters/MailerModel.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/reporters/MailerModel.java?rev=1242196&r1=1242195&r2=1242196&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/reporters/MailerModel.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/reporters/MailerModel.java Thu Feb  9 01:00:30
2012
@@ -305,7 +305,7 @@ public class MailerModel extends Abstrac
      */
     public void sendMail(String from, List<String> vEmails, String subject, String
attText, String smtpHost) 
             throws AddressException, MessagingException {
-        sendMail(from, vEmails, subject, attText, smtpHost, Integer.parseInt(DEFAULT_SMTP_PORT),
null, null, null);   
+        sendMail(from, vEmails, subject, attText, smtpHost, DEFAULT_SMTP_PORT, null, null,
null);   
     }
     
     /**
@@ -331,7 +331,7 @@ public class MailerModel extends Abstrac
      */
     public void sendMail(String from, List<String> vEmails, String subject,
             String attText, String smtpHost, 
-            int smtpPort,
+            String smtpPort,
             final String user,
             final String password,
             MailAuthType mailAuthType)
@@ -349,7 +349,7 @@ public class MailerModel extends Abstrac
         Properties props = new Properties();
 
         props.put(MAIL_SMTP_HOST, smtpHost);
-        props.put(MAIL_SMTP_PORT, Integer.toString(smtpPort)); // property values are strings
+        props.put(MAIL_SMTP_PORT, smtpPort); // property values are strings
         Authenticator authenticator = null;
         if(mailAuthType != MailAuthType.NONE) {
             props.put(MAIL_SMTP_AUTH, "true");
@@ -488,8 +488,8 @@ public class MailerModel extends Abstrac
         return getPropertyAsString(HOST_KEY);
     }
 
-    public int getSmtpPort() {
-        return getPropertyAsInt(PORT_KEY, Integer.parseInt(DEFAULT_SMTP_PORT));
+    public String getSmtpPort() {
+        return getPropertyAsString(PORT_KEY, DEFAULT_SMTP_PORT);
     }
 
     public String getFailureSubject() {

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/MailerVisualizer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/MailerVisualizer.java?rev=1242196&r1=1242195&r2=1242196&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/MailerVisualizer.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/MailerVisualizer.java Thu Feb
 9 01:00:30 2012
@@ -397,7 +397,7 @@ public class MailerVisualizer extends Ab
         addressField.setText(model.getToAddress());
         fromField.setText(model.getFromAddress());
         smtpHostField.setText(model.getSmtpHost());
-        smtpPortField.setText(Integer.toString(model.getSmtpPort()));
+        smtpPortField.setText(model.getSmtpPort());
         smtpLoginField.setText(model.getLogin());
         smtpPasswordField.setText(model.getPassword());
         authTypeCombo.setSelectedItem(model.getMailAuthType().toString());



Mime
View raw message