jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1718725 - in /jmeter/trunk/src: components/org/apache/jmeter/assertions/ core/org/apache/jmeter/gui/ core/org/apache/jmeter/gui/action/ core/org/apache/jmeter/gui/util/ core/org/apache/jmeter/testelement/ protocol/http/org/apache/jmeter/pr...
Date Tue, 08 Dec 2015 22:17:45 GMT
Author: pmouawad
Date: Tue Dec  8 22:17:45 2015
New Revision: 1718725

URL: http://svn.apache.org/viewvc?rev=1718725&view=rev
Log:
#resolve #47

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/assertions/HTMLAssertion.java
    jmeter/trunk/src/components/org/apache/jmeter/assertions/MD5HexAssertion.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/Save.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java
    jmeter/trunk/src/core/org/apache/jmeter/testelement/AbstractTestElement.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParserHTMLParser.java
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ReceiveSubscriber.java
    jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/SmtpSampler.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/assertions/HTMLAssertion.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/assertions/HTMLAssertion.java?rev=1718725&r1=1718724&r2=1718725&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/assertions/HTMLAssertion.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/assertions/HTMLAssertion.java Tue Dec  8
22:17:45 2015
@@ -263,7 +263,7 @@ public class HTMLAssertion extends Abstr
      *            used
      */
     public void setDoctype(String inDoctype) {
-        if ((inDoctype == null) || (inDoctype.trim().equals(""))) {
+        if ((inDoctype == null) || (inDoctype.trim().isEmpty())) {
             setProperty(new StringProperty(DOCTYPE_KEY, DEFAULT_DOCTYPE));
         } else {
             setProperty(new StringProperty(DOCTYPE_KEY, inDoctype));

Modified: jmeter/trunk/src/components/org/apache/jmeter/assertions/MD5HexAssertion.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/assertions/MD5HexAssertion.java?rev=1718725&r1=1718724&r2=1718725&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/assertions/MD5HexAssertion.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/assertions/MD5HexAssertion.java Tue Dec
 8 22:17:45 2015
@@ -65,7 +65,7 @@ public class MD5HexAssertion extends Abs
         }
 
         // no point in checking if we don't have anything to compare against
-        if (getAllowedMD5Hex().equals("")) {
+        if (getAllowedMD5Hex().isEmpty()) {
             result.setError(false);
             result.setFailure(true);
             result.setFailureMessage("MD5Hex to test against is empty");
@@ -99,8 +99,7 @@ public class MD5HexAssertion extends Abs
         byte[] md5Result = {};
 
         try {
-            MessageDigest md;
-            md = MessageDigest.getInstance("MD5");
+            MessageDigest md = MessageDigest.getInstance("MD5");
             md5Result = md.digest(ba);
         } catch (NoSuchAlgorithmException e) {
             log.error("", e);

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java?rev=1718725&r1=1718724&r2=1718725&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java Tue Dec  8 22:17:45 2015
@@ -202,13 +202,13 @@ public final class GuiPackage implements
         String guiClassName = node.getPropertyAsString(TestElement.GUI_CLASS);
         try {
             Class<?> testClass;
-            if (testClassName.equals("")) { // $NON-NLS-1$
+            if (testClassName.isEmpty()) { // $NON-NLS-1$
                 testClass = node.getClass();
             } else {
                 testClass = Class.forName(testClassName);
             }
             Class<?> guiClass = null;
-            if (!guiClassName.equals("")) { // $NON-NLS-1$
+            if (!guiClassName.isEmpty()) { // $NON-NLS-1$
                 guiClass = Class.forName(guiClassName);
             }
             return getGui(node, guiClass, testClass);

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/Save.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/Save.java?rev=1718725&r1=1718724&r2=1718725&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/Save.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/Save.java Tue Dec  8 22:17:45 2015
@@ -183,7 +183,7 @@ public class Save implements Command {
             }
             updateFile = chooser.getSelectedFile().getAbsolutePath();
             // Make sure the file ends with proper extension
-            if(FilenameUtils.getExtension(updateFile).equals("")) {
+            if(FilenameUtils.getExtension(updateFile).isEmpty()) {
                 updateFile = updateFile + JMX_FILE_EXTENSION;
             }
             // Check if the user is trying to save to an existing file

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java?rev=1718725&r1=1718724&r2=1718725&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java Tue Dec  8 22:17:45
2015
@@ -156,7 +156,7 @@ public class JMeterMenuBar extends JMenu
         remote_engine_shut = new LinkedList<>();
         remote_engine_exit = new LinkedList<>();
         remoteHosts = JOrphanUtils.split(JMeterUtils.getPropDefault("remote_hosts", ""),
","); //$NON-NLS-1$
-        if (remoteHosts.length == 1 && remoteHosts[0].equals("")) {
+        if (remoteHosts.length == 1 && remoteHosts[0].isEmpty()) {
             remoteHosts = new String[0];
         }
         this.getRemoteItems();

Modified: jmeter/trunk/src/core/org/apache/jmeter/testelement/AbstractTestElement.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/testelement/AbstractTestElement.java?rev=1718725&r1=1718724&r2=1718725&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/testelement/AbstractTestElement.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/testelement/AbstractTestElement.java Tue Dec 
8 22:17:45 2015
@@ -295,7 +295,7 @@ public abstract class AbstractTestElemen
         }
         JMeterProperty prop = getProperty(property.getName());
 
-        if (prop instanceof NullProperty || (prop instanceof StringProperty && prop.getStringValue().equals("")))
{
+        if (prop instanceof NullProperty || (prop instanceof StringProperty && prop.getStringValue().isEmpty()))
{
             propMap.put(property.getName(), propertyToPut);
         } else {
             prop.mergeIn(propertyToPut);

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParserHTMLParser.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParserHTMLParser.java?rev=1718725&r1=1718724&r2=1718725&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParserHTMLParser.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParserHTMLParser.java
Tue Dec  8 22:17:45 2015
@@ -130,7 +130,7 @@ class HtmlParserHTMLParser extends HTMLP
                 BaseHrefTag baseHref = (BaseHrefTag) tag;
                 String baseref = baseHref.getBaseUrl();
                 try {
-                    if (!baseref.equals(""))// Bugzilla 30713
+                    if (!baseref.isEmpty())// Bugzilla 30713
                     {
                         baseUrl.url = ConversionUtils.makeRelativeURL(baseUrl.url, baseref);
                     }

Modified: jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ReceiveSubscriber.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ReceiveSubscriber.java?rev=1718725&r1=1718724&r2=1718725&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ReceiveSubscriber.java
(original)
+++ jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ReceiveSubscriber.java
Tue Dec  8 22:17:45 2015
@@ -378,6 +378,6 @@ public class ReceiveSubscriber implement
      * @return True if input is null, an empty string, or a white space-only string
      */
     private boolean isEmpty(String s1) {
-        return (s1 == null || s1.trim().equals(""));
+        return (s1 == null || s1.trim().isEmpty());
     }
 }

Modified: jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/SmtpSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/SmtpSampler.java?rev=1718725&r1=1718724&r2=1718725&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/SmtpSampler.java
(original)
+++ jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/SmtpSampler.java
Tue Dec  8 22:17:45 2015
@@ -177,7 +177,7 @@ public class SmtpSampler extends Abstrac
                 instance.setMailBody(getPropertyAsString(MESSAGE));
                 instance.setPlainBody(getPropertyAsBoolean(PLAIN_BODY));
                 final String filesToAttach = getPropertyAsString(ATTACH_FILE);
-                if (!filesToAttach.equals("")) {
+                if (!filesToAttach.isEmpty()) {
                     String[] attachments = filesToAttach.split(FILENAME_SEPARATOR);
                     for (String attachment : attachments) {
                         File file = new File(attachment);



Mime
View raw message