james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Maurer <nor...@apache.org>
Subject Re: svn commit: r1078874 - in /james/mailbox/trunk/store: pom.xml src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
Date Mon, 07 Mar 2011 19:07:14 GMT
To be honest, I don't think the use of one class satisfy the dependency of
commons-collection. As the implementation is such a trivial one.

Bye,
Norman

2011/3/7 Felix Knecht <felixk@apache.org>

> @Wojtek
>
> Hi
>
> Can you please review fix if it is also in your sense? Otherwise please
> correct fix. Without EmptyIterator it breaks tests done by
> mailbox-integration-tests project.
>
> Thanks
> Felix
>
>
>
> On 03/07/2011 07:08 PM, felixk@apache.org wrote:
>
>> Author: felixk
>> Date: Mon Mar  7 18:08:11 2011
>> New Revision: 1078874
>>
>> URL: http://svn.apache.org/viewvc?rev=1078874&view=rev
>> Log:
>> This seems to cause the mailbox-integration-test failures.
>> "public Iterator<MessageResult>  getMessages(...)" may now return a null
>> value, which wasn't the case before commit 1078490 [1]. It should IMO at
>> least an
>> EmptyIterator instead of a null value.
>>
>> [1] http://svn.apache.org/viewvc?rev=1078490&view=rev
>>
>> Modified:
>>     james/mailbox/trunk/store/pom.xml
>>
>> james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
>>
>> Modified: james/mailbox/trunk/store/pom.xml
>> URL:
>> http://svn.apache.org/viewvc/james/mailbox/trunk/store/pom.xml?rev=1078874&r1=1078873&r2=1078874&view=diff
>>
>> ==============================================================================
>> --- james/mailbox/trunk/store/pom.xml (original)
>> +++ james/mailbox/trunk/store/pom.xml Mon Mar  7 18:08:11 2011
>> @@ -53,6 +53,10 @@
>>        <artifactId>lucene-analyzers</artifactId>
>>      </dependency>
>>      <dependency>
>> +<groupId>commons-collections</groupId>
>> +<artifactId>commons-collections</artifactId>
>> +</dependency>
>> +<dependency>
>>        <groupId>junit</groupId>
>>        <artifactId>junit</artifactId>
>>        <scope>test</scope>
>>
>> Modified:
>> james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
>> URL:
>> http://svn.apache.org/viewvc/james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java?rev=1078874&r1=1078873&r2=1078874&view=diff
>>
>> ==============================================================================
>> ---
>> james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
>> (original)
>> +++
>> james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
>> Mon Mar  7 18:08:11 2011
>> @@ -38,6 +38,7 @@ import javax.mail.Flags;
>>  import javax.mail.Flags.Flag;
>>  import javax.mail.util.SharedFileInputStream;
>>
>> +import org.apache.commons.collections.iterators.EmptyIterator;
>>  import org.apache.james.mailbox.MailboxException;
>>  import org.apache.james.mailbox.MailboxListener;
>>  import org.apache.james.mailbox.MailboxSession;
>> @@ -485,7 +486,11 @@ public abstract class StoreMessageManage
>>                  iterator = it;
>>              }
>>
>> +            @SuppressWarnings("unchecked")
>>              public Iterator<MessageResult>  getIterator() {
>> +               if (iterator == null) {
>> +                   return
>> (Iterator<MessageResult>)EmptyIterator.INSTANCE;
>> +               }
>>                  return iterator;
>>              }
>>          }
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-dev-help@james.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message