jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r1379856 - in /jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol: mail/sampler/MailFileFolder.java smtp/sampler/protocol/TrustAllSSLSocketFactory.java
Date Sun, 02 Sep 2012 10:52:34 GMT
On 1 September 2012 22:10,  <pmouawad@apache.org> wrote:
> Author: pmouawad
> Date: Sat Sep  1 21:10:19 2012
> New Revision: 1379856
>
> URL: http://svn.apache.org/viewvc?rev=1379856&view=rev
> Log:
> method returning arrays should return empty array instead of null

Ideally yes, but it depends on how the API was defined.
There may be cases where null is treated differently from an empty array.

In this case it appears that empty arrays are expected and null is
not, so the change is OK.

> Modified:
>     jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java
>     jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/protocol/TrustAllSSLSocketFactory.java
>
> Modified: jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java
> URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java?rev=1379856&r1=1379855&r2=1379856&view=diff
> ==============================================================================
> --- jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java
(original)
> +++ jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java
Sat Sep  1 21:10:19 2012
> @@ -90,7 +90,7 @@ public class MailFileFolder extends Fold
>
>      @Override
>      public Message[] expunge() throws MessagingException {
> -        return null;
> +        return new Message[0];
>      }
>
>      @Override
>
> Modified: jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/protocol/TrustAllSSLSocketFactory.java
> URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/protocol/TrustAllSSLSocketFactory.java?rev=1379856&r1=1379855&r2=1379856&view=diff
> ==============================================================================
> --- jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/protocol/TrustAllSSLSocketFactory.java
(original)
> +++ jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/protocol/TrustAllSSLSocketFactory.java
Sat Sep  1 21:10:19 2012
> @@ -46,7 +46,7 @@ public class TrustAllSSLSocketFactory ex
>              sslcontext.init( null, new TrustManager[]{
>                      new X509TrustManager() {
>                          public java.security.cert.X509Certificate[] getAcceptedIssuers()
{
> -                            return null;
> +                            return new java.security.cert.X509Certificate[0];
>                          }
>                          public void checkClientTrusted(
>                                  java.security.cert.X509Certificate[] certs, String authType)
{
>
>

Mime
View raw message