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 12:00:17 GMT
On 2 September 2012 12:48, Philippe Mouawad <philippe.mouawad@gmail.com> wrote:
> Hello sebb,
> I checked api before doing changes and you are right , for example ssl
> related api expects null so i didn't change.

Which API is that? It would be useful to document the instances that
can return null.

> But if you see something wrong, revert the change.

The changes in this commit are OK, but in future I think we need to
document why such fixes are OK, either in log message, or better in
the code.

> Thanks for review
> Regards
> Philippe
>
> On Sunday, September 2, 2012, sebb wrote:
>
>> On 1 September 2012 22:10,  <pmouawad@apache.org <javascript:;>> 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) {
>> >
>> >
>>
>
>
> --
> Cordialement.
> Philippe Mouawad.

Mime
View raw message